Fixed ACT/CGT
This commit is contained in:
parent
b997c4efdb
commit
b2070da2b8
@ -7,6 +7,7 @@ import java.util.UUID;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
||||||
import org.json.simple.JSONObject;
|
import org.json.simple.JSONObject;
|
||||||
|
|
||||||
@ -23,8 +24,8 @@ import com.redstoner.modules.Module;
|
|||||||
*
|
*
|
||||||
* @author Pepich */
|
* @author Pepich */
|
||||||
@AutoRegisterListener
|
@AutoRegisterListener
|
||||||
@Version(major = 1, minor = 0, revision = 3, compatible = 1)
|
@Version(major = 1, minor = 0, revision = 4, compatible = 1)
|
||||||
public class Adminchat implements Module
|
public class Adminchat implements Module, Listener
|
||||||
{
|
{
|
||||||
private static final char defaultKey = ',';
|
private static final char defaultKey = ',';
|
||||||
private boolean enabled = false;
|
private boolean enabled = false;
|
||||||
@ -125,7 +126,7 @@ public class Adminchat implements Module
|
|||||||
@Command(hook = "act")
|
@Command(hook = "act")
|
||||||
public boolean acToggleCommand(CommandSender sender)
|
public boolean acToggleCommand(CommandSender sender)
|
||||||
{
|
{
|
||||||
if (actoggled.contains(sender))
|
if (actoggled.contains(((Player) sender).getUniqueId()))
|
||||||
{
|
{
|
||||||
actoggled.remove(((Player) sender).getUniqueId());
|
actoggled.remove(((Player) sender).getUniqueId());
|
||||||
Utils.sendMessage(sender, null, "ACT now §cdisabled");
|
Utils.sendMessage(sender, null, "ACT now §cdisabled");
|
||||||
@ -145,7 +146,7 @@ public class Adminchat implements Module
|
|||||||
@Command(hook = "act_on")
|
@Command(hook = "act_on")
|
||||||
public boolean acToggleOnCommand(CommandSender sender)
|
public boolean acToggleOnCommand(CommandSender sender)
|
||||||
{
|
{
|
||||||
if (!actoggled.contains(sender))
|
if (!actoggled.contains(((Player) sender).getUniqueId()))
|
||||||
{
|
{
|
||||||
actoggled.add(((Player) sender).getUniqueId());
|
actoggled.add(((Player) sender).getUniqueId());
|
||||||
Utils.sendMessage(sender, null, "ACT now §aenabled");
|
Utils.sendMessage(sender, null, "ACT now §aenabled");
|
||||||
@ -162,7 +163,7 @@ public class Adminchat implements Module
|
|||||||
@Command(hook = "act_off")
|
@Command(hook = "act_off")
|
||||||
public boolean acToggleOffCommand(CommandSender sender)
|
public boolean acToggleOffCommand(CommandSender sender)
|
||||||
{
|
{
|
||||||
if (actoggled.contains(sender))
|
if (actoggled.contains(((Player) sender).getUniqueId()))
|
||||||
{
|
{
|
||||||
actoggled.remove(((Player) sender).getUniqueId());
|
actoggled.remove(((Player) sender).getUniqueId());
|
||||||
Utils.sendMessage(sender, null, "ACT now §cdisabled");
|
Utils.sendMessage(sender, null, "ACT now §cdisabled");
|
||||||
|
@ -200,7 +200,7 @@ public class Chatgroups implements Module, Listener
|
|||||||
public boolean cgToggleCommand(CommandSender sender)
|
public boolean cgToggleCommand(CommandSender sender)
|
||||||
{
|
{
|
||||||
if (getGroup(sender) != null)
|
if (getGroup(sender) != null)
|
||||||
if (cgtoggled.contains(sender))
|
if (cgtoggled.contains(((Player) sender).getUniqueId()))
|
||||||
{
|
{
|
||||||
cgtoggled.remove(((Player) sender).getUniqueId());
|
cgtoggled.remove(((Player) sender).getUniqueId());
|
||||||
Utils.sendMessage(sender, null, "CGT now §cdisabled");
|
Utils.sendMessage(sender, null, "CGT now §cdisabled");
|
||||||
|
Reference in New Issue
Block a user