mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-30 02:05:41 +00:00
.
This commit is contained in:
parent
3895c2235e
commit
d17457dbfa
@ -55,8 +55,6 @@ public class WorldEditListener extends PluginListener<TotalFreedomMod>
|
||||
|
||||
if (event.getLimit() < 0 || event.getLimit() > 200000)
|
||||
{
|
||||
player.setOp(false);
|
||||
FUtil.bcastMsg(event.getPlayer().getName() + " tried to set their WorldEdit limit to " + event.getLimit() + " and has been de-opped", ChatColor.RED);
|
||||
event.setCancelled(true);
|
||||
player.sendMessage(ChatColor.RED + "You cannot set your limit higher than 200000 or to -1!");
|
||||
}
|
||||
|
@ -14,8 +14,9 @@ public class Command_gravity extends FreedomCommand
|
||||
@Override
|
||||
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||
{
|
||||
playerSender.setGravity(!playerSender.hasGravity());
|
||||
msg((playerSender.hasGravity() ? "En" : "Dis") + "abled gravity.", (playerSender.hasGravity() ? ChatColor.GREEN : ChatColor.RED));
|
||||
boolean enabled = !playerSender.hasGravity();
|
||||
playerSender.setGravity(enabled);
|
||||
msg((enabled ? "En" : "Dis") + "abled gravity.", (enabled ? ChatColor.GREEN : ChatColor.RED));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,22 @@
|
||||
package me.totalfreedom.totalfreedommod.command;
|
||||
|
||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||
@CommandParameters(description = "Toggle item pickup.", usage = "/<command>")
|
||||
public class Command_togglepickup extends FreedomCommand
|
||||
{
|
||||
|
||||
@Override
|
||||
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||
{
|
||||
boolean enabled = !playerSender.getCanPickupItems();
|
||||
playerSender.setCanPickupItems(enabled);
|
||||
msg((enabled ? "En" : "Dis") + "abled item pickup.", (enabled ? ChatColor.GREEN : ChatColor.RED));
|
||||
return true;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user