based palestine

This commit is contained in:
Ivan 2019-08-27 19:25:50 -04:00
parent d21c5f0e9d
commit bd6c7d55a7
8 changed files with 42 additions and 6 deletions

View File

@ -103,6 +103,13 @@ public class BlockBlocker extends FreedomService
event.setCancelled(true); event.setCancelled(true);
break; break;
} }
case GRINDSTONE:
{
player.sendMessage(ChatColor.GRAY + "Grindstones are disabled.");
player.getInventory().setItem(player.getInventory().getHeldItemSlot(), new ItemStack(Material.COOKIE, 1));
event.setCancelled(true);
break;
}
} }
} }
} }

View File

@ -128,6 +128,19 @@ public class InteractBlocker extends FreedomService
event.setCancelled(true); event.setCancelled(true);
break; break;
} }
case ARMOR_STAND:
{
if (ConfigEntry.ALLOW_ARMOR_STANDS.getBoolean())
{
break;
}
player.getInventory().clear(player.getInventory().getHeldItemSlot());
player.sendMessage(ChatColor.GRAY + "Armor stands are currently disabled.");
event.setCancelled(true);
break;
}
} }
} }
} }

View File

@ -38,6 +38,7 @@ public class Command_toggle extends FreedomCommand
msg("- explosives [radius]"); msg("- explosives [radius]");
msg("- unsafeenchs"); msg("- unsafeenchs");
msg("- bells"); msg("- bells");
msg("- armorstands");
return false; return false;
} }
@ -165,6 +166,11 @@ public class Command_toggle extends FreedomCommand
toggle("The ringing of bells is", ConfigEntry.ALLOW_BELLS); toggle("The ringing of bells is", ConfigEntry.ALLOW_BELLS);
return true; return true;
} }
else if (args[0].equalsIgnoreCase("armorstands"))
{
toggle("The placement of armor stands is", ConfigEntry.ALLOW_ARMOR_STANDS);
return true;
}
else else
{ {
return false; return false;
@ -183,7 +189,7 @@ public class Command_toggle extends FreedomCommand
{ {
return Arrays.asList( return Arrays.asList(
"waterplace", "fireplace", "lavaplace", "fluidspread", "lavadmg", "firespread", "frostwalk", "waterplace", "fireplace", "lavaplace", "fluidspread", "lavadmg", "firespread", "frostwalk",
"firework", "prelog", "lockdown", "petprotect", "entitywipe", "nonuke", "explosives", "unsafeenchs", "bells"); "firework", "prelog", "lockdown", "petprotect", "entitywipe", "nonuke", "explosives", "unsafeenchs", "bells", "armorstands");
} }
return Collections.emptyList(); return Collections.emptyList();

View File

@ -7,6 +7,7 @@ import org.bukkit.ChatColor;
import org.bukkit.command.Command; import org.bukkit.command.Command;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.Server;
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.ONLY_CONSOLE, blockHostConsole = true) @CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.ONLY_CONSOLE, blockHostConsole = true)
@CommandParameters(description = "Wipe the flatlands map. Requires manual restart after command is used.", usage = "/<command>") @CommandParameters(description = "Wipe the flatlands map. Requires manual restart after command is used.", usage = "/<command>")
@ -35,6 +36,8 @@ public class Command_wipeflatlands extends FreedomCommand
{ {
player.kickPlayer("Server is going offline for flatlands wipe, come back in a few minutes."); player.kickPlayer("Server is going offline for flatlands wipe, come back in a few minutes.");
} }
server.shutdown();
if (!plugin.amp.enabled) if (!plugin.amp.enabled)
{ {

View File

@ -23,6 +23,7 @@ public enum ConfigEntry
ALLOW_FROSTWALKER(Boolean.class, "allow.frostwalker"), ALLOW_FROSTWALKER(Boolean.class, "allow.frostwalker"),
ALLOW_UNSAFE_ENCHANTMENTS(Boolean.class, "allow.unsafe_enchantments"), ALLOW_UNSAFE_ENCHANTMENTS(Boolean.class, "allow.unsafe_enchantments"),
ALLOW_BELLS(Boolean.class, "allow.bells"), ALLOW_BELLS(Boolean.class, "allow.bells"),
ALLOW_ARMOR_STANDS(Boolean.class, "allow.armorstands"),
// //
BLOCKED_CHATCODES(String.class, "blocked_chatcodes"), BLOCKED_CHATCODES(String.class, "blocked_chatcodes"),
// //

View File

@ -54,7 +54,7 @@ public class HubWorldRestrictions extends FreedomService
if (doRestrict(player)) if (doRestrict(player))
{ {
player.sendMessage(ChatColor.RED + "Only Executives can do this!"); player.sendMessage(ChatColor.RED + "Only Executives can do this in the Hub World!");
event.setCancelled(true); event.setCancelled(true);
} }
} }
@ -66,7 +66,7 @@ public class HubWorldRestrictions extends FreedomService
if (doRestrict(player)) if (doRestrict(player))
{ {
player.sendMessage(ChatColor.RED + "Only Executives can do this!"); player.sendMessage(ChatColor.RED + "Only Executives can do this in the Hub World!");
event.setCancelled(true); event.setCancelled(true);
} }
} }
@ -78,7 +78,7 @@ public class HubWorldRestrictions extends FreedomService
if (doRestrict(player)) if (doRestrict(player))
{ {
player.sendMessage(ChatColor.RED + "Only Executives can do this!"); player.sendMessage(ChatColor.RED + "Only Executives can do this in the Hub World!");
event.setCancelled(true); event.setCancelled(true);
} }
} }
@ -90,7 +90,7 @@ public class HubWorldRestrictions extends FreedomService
if (doRestrict(player)) if (doRestrict(player))
{ {
player.sendMessage(ChatColor.RED + "Only Executives can do this!"); player.sendMessage(ChatColor.RED + "Only Executives can do this in the Hub World!");
event.setCancelled(true); event.setCancelled(true);
} }
} }
@ -104,7 +104,7 @@ public class HubWorldRestrictions extends FreedomService
if (doRestrict(player)) if (doRestrict(player))
{ {
player.sendMessage(ChatColor.RED + "Only Executives can do this!"); player.sendMessage(ChatColor.RED + "Only Executives can do this in the Hub World!");
event.setCancelled(true); event.setCancelled(true);
} }
} }

View File

@ -84,6 +84,11 @@ public class FUtil
{ {
return ConfigEntry.SERVER_OWNERS.getStringList().contains(name) || ConfigEntry.SERVER_EXECUTIVES.getStringList().contains(name); return ConfigEntry.SERVER_OWNERS.getStringList().contains(name) || ConfigEntry.SERVER_EXECUTIVES.getStringList().contains(name);
} }
public static boolean isDeveloper(String name)
{
return FUtil.DEVELOPERS.contains(name);
}
public static boolean canManageMasterBuilders(String name) public static boolean canManageMasterBuilders(String name)
{ {

View File

@ -108,6 +108,7 @@ allow:
frostwalker: false frostwalker: false
unsafe_enchantments: true unsafe_enchantments: true
bells: true bells: true
armorstands: false
# Blocked commands: # Blocked commands:
# #