mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 09:15: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
|
// Check for adminchat
|
||||||
final FPlayer fPlayer = plugin.pl.getPlayerSync(player);
|
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())
|
if (fPlayer.inAdminChat())
|
||||||
{
|
{
|
||||||
FSync.adminChatMessage(player, message);
|
FSync.adminChatMessage(player, message);
|
||||||
|
@ -92,6 +92,7 @@ public class Command_lockup extends FreedomCommand
|
|||||||
if (lockupScheduleId != null)
|
if (lockupScheduleId != null)
|
||||||
{
|
{
|
||||||
lockupScheduleId.cancel();
|
lockupScheduleId.cancel();
|
||||||
|
playerdata.setLockedUp(false);
|
||||||
playerdata.setLockupScheduleId(null);
|
playerdata.setLockupScheduleId(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -107,6 +108,7 @@ public class Command_lockup extends FreedomCommand
|
|||||||
|
|
||||||
cancelLockup(playerdata);
|
cancelLockup(playerdata);
|
||||||
|
|
||||||
|
playerdata.setLockedUp(true);
|
||||||
playerdata.setLockupScheduleId(new BukkitRunnable()
|
playerdata.setLockupScheduleId(new BukkitRunnable()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
|
@ -56,6 +56,7 @@ public class FPlayer
|
|||||||
private boolean mp44Armed = false;
|
private boolean mp44Armed = false;
|
||||||
private boolean mp44Firing = false;
|
private boolean mp44Firing = false;
|
||||||
private BukkitTask lockupScheduleTask = null;
|
private BukkitTask lockupScheduleTask = null;
|
||||||
|
private boolean lockedUp = false;
|
||||||
private String lastMessage = "";
|
private String lastMessage = "";
|
||||||
private boolean inAdminchat = false;
|
private boolean inAdminchat = false;
|
||||||
private boolean allCommandsBlocked = false;
|
private boolean allCommandsBlocked = false;
|
||||||
@ -328,6 +329,16 @@ public class FPlayer
|
|||||||
this.lockupScheduleTask = id;
|
this.lockupScheduleTask = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isLockedUp()
|
||||||
|
{
|
||||||
|
return this.lockedUp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLockedUp(boolean lockedUp)
|
||||||
|
{
|
||||||
|
this.lockedUp = lockedUp;
|
||||||
|
}
|
||||||
|
|
||||||
public void setLastMessage(String message)
|
public void setLastMessage(String message)
|
||||||
{
|
{
|
||||||
this.lastMessage = message;
|
this.lastMessage = message;
|
||||||
|
Loading…
Reference in New Issue
Block a user