mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
for luke
This commit is contained in:
parent
52269c2122
commit
3ea73f78e9
@ -69,6 +69,12 @@ public class ChatManager extends FreedomService
|
||||
|
||||
// Check for adminchat
|
||||
final FPlayer fPlayer = plugin.pl.getPlayerSync(player);
|
||||
if (fPlayer.isLockedUp())
|
||||
{
|
||||
FSync.playerMsg(player, "You're locked up and cannot talk.");
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
if (fPlayer.inAdminChat())
|
||||
{
|
||||
FSync.adminChatMessage(player, message);
|
||||
|
@ -92,6 +92,7 @@ public class Command_lockup extends FreedomCommand
|
||||
if (lockupScheduleId != null)
|
||||
{
|
||||
lockupScheduleId.cancel();
|
||||
playerdata.setLockedUp(false);
|
||||
playerdata.setLockupScheduleId(null);
|
||||
}
|
||||
}
|
||||
@ -107,6 +108,7 @@ public class Command_lockup extends FreedomCommand
|
||||
|
||||
cancelLockup(playerdata);
|
||||
|
||||
playerdata.setLockedUp(true);
|
||||
playerdata.setLockupScheduleId(new BukkitRunnable()
|
||||
{
|
||||
@Override
|
||||
|
@ -56,6 +56,7 @@ public class FPlayer
|
||||
private boolean mp44Armed = false;
|
||||
private boolean mp44Firing = false;
|
||||
private BukkitTask lockupScheduleTask = null;
|
||||
private boolean lockedUp = false;
|
||||
private String lastMessage = "";
|
||||
private boolean inAdminchat = false;
|
||||
private boolean allCommandsBlocked = false;
|
||||
@ -328,6 +329,16 @@ public class FPlayer
|
||||
this.lockupScheduleTask = id;
|
||||
}
|
||||
|
||||
public boolean isLockedUp()
|
||||
{
|
||||
return this.lockedUp;
|
||||
}
|
||||
|
||||
public void setLockedUp(boolean lockedUp)
|
||||
{
|
||||
this.lockedUp = lockedUp;
|
||||
}
|
||||
|
||||
public void setLastMessage(String message)
|
||||
{
|
||||
this.lastMessage = message;
|
||||
|
Loading…
Reference in New Issue
Block a user