mirror of
https://github.com/TotalFreedomMC/TF-Marriage.git
synced 2025-08-07 04:52:55 +00:00
Add chat command
This commit is contained in:
parent
3486c8a13f
commit
fe0467f17d
4 changed files with 97 additions and 3 deletions
|
@ -0,0 +1,24 @@
|
|||
package com.lenis0012.bukkit.marriage2.commands;
|
||||
|
||||
import com.lenis0012.bukkit.marriage2.MPlayer;
|
||||
import com.lenis0012.bukkit.marriage2.Marriage;
|
||||
import com.lenis0012.bukkit.marriage2.config.Message;
|
||||
|
||||
public class CommandChat extends Command {
|
||||
|
||||
public CommandChat(Marriage marriage) {
|
||||
super(marriage, "chat");
|
||||
setDescription("Enable partner-only chat mode");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
MPlayer mPlayer = marriage.getMPlayer(player.getUniqueId());
|
||||
if(!mPlayer.isMarried()) {
|
||||
reply(Message.NOT_MARRIED);
|
||||
return;
|
||||
}
|
||||
|
||||
mPlayer.setInChat(true);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue