mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-26 17:05:01 +00:00
Merge branch 'main' of github.com:AtlasMediaGroup/TotalFreedomMod into merge/main/development
This commit is contained in:
commit
8f6d276bb6
@ -172,7 +172,7 @@ public class EventBlocker extends FreedomService
|
|||||||
@EventHandler(priority = EventPriority.NORMAL)
|
@EventHandler(priority = EventPriority.NORMAL)
|
||||||
public void onPlayerDropItem(PlayerDropItemEvent event)
|
public void onPlayerDropItem(PlayerDropItemEvent event)
|
||||||
{
|
{
|
||||||
if (!plugin.al.isAdmin(event.getPlayer()))
|
if (!plugin.al.isAdmin(event.getPlayer()) && !ConfigEntry.ALLOW_ITEM_DROPS.getBoolean())
|
||||||
{
|
{
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
@ -19,9 +19,9 @@ public class Command_toggle extends FreedomCommand
|
|||||||
private final List<String> toggles = Arrays.asList(
|
private final List<String> toggles = Arrays.asList(
|
||||||
"waterplace", "fireplace", "lavaplace", "fluidspread", "lavadmg", "firespread", "frostwalk",
|
"waterplace", "fireplace", "lavaplace", "fluidspread", "lavadmg", "firespread", "frostwalk",
|
||||||
"firework", "prelog", "lockdown", "petprotect", "entitywipe", "nonuke [range] [count]",
|
"firework", "prelog", "lockdown", "petprotect", "entitywipe", "nonuke [range] [count]",
|
||||||
"explosives [radius]", "unsafeenchs", "bells", "armorstands", "masterblocks", "books", "grindstones",
|
"explosives [radius]", "unsafeenchs", "bells", "armorstands", "masterblocks", "item_drops",
|
||||||
"jukeboxes", "spawners", "4chan", "beehives", "respawnanchors", "autotp", "autoclear", "minecarts", "mp44",
|
"grindstones", "jukeboxes", "spawners", "4chan", "beehives", "respawnanchors", "autotp", "autoclear", "minecarts",
|
||||||
"landmines", "tossmob", "gravity");
|
"mp44", "landmines", "tossmob", "gravity");
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
@ -205,6 +205,12 @@ public class Command_toggle extends FreedomCommand
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case "item_drops":
|
||||||
|
{
|
||||||
|
toggle("Item drops are", ConfigEntry.ALLOW_ITEM_DROPS);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case "grindstones":
|
case "grindstones":
|
||||||
{
|
{
|
||||||
toggle("Grindstones are", ConfigEntry.ALLOW_GRINDSTONES);
|
toggle("Grindstones are", ConfigEntry.ALLOW_GRINDSTONES);
|
||||||
|
@ -35,6 +35,7 @@ public enum ConfigEntry
|
|||||||
ALLOW_GRAVITY(Boolean.class, "allow.gravity"),
|
ALLOW_GRAVITY(Boolean.class, "allow.gravity"),
|
||||||
ALLOW_MASTERBLOCKS(Boolean.class, "allow.masterblocks"),
|
ALLOW_MASTERBLOCKS(Boolean.class, "allow.masterblocks"),
|
||||||
ALLOW_BOOKS(Boolean.class, "allow.books"),
|
ALLOW_BOOKS(Boolean.class, "allow.books"),
|
||||||
|
ALLOW_ITEM_DROPS(Boolean.class, "allow.item_drops"),
|
||||||
//
|
//
|
||||||
BLOCKED_CHATCODES(String.class, "blocked_chatcodes"),
|
BLOCKED_CHATCODES(String.class, "blocked_chatcodes"),
|
||||||
//
|
//
|
||||||
|
@ -221,6 +221,7 @@ allow:
|
|||||||
gravity: false
|
gravity: false
|
||||||
masterblocks: false
|
masterblocks: false
|
||||||
books: true
|
books: true
|
||||||
|
item_drops: false
|
||||||
|
|
||||||
blocked_commands:
|
blocked_commands:
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user