Added option to clear inventory and/or enderchest on island delete

This commit is contained in:
Fabrizio La Rosa 2020-06-15 05:12:47 +02:00
parent 977c599a10
commit 0be81ba262
3 changed files with 14 additions and 0 deletions

View File

@ -14,6 +14,7 @@ This fork contains bug fixes, features and improvements:
- Added water in Nether mechanics!
- Added option to let slime splitting bypass limits.yml
- Added option to define distance between islands
- Added option to clear inventory and/or enderchest on island delete (working only with online players)
- Fixed bugs in Challenges that didn't remove all the items
- Fixed WorldBorder size not reflecting real island size
- Now you can use `/is chat <message>` to send messages to island chat

View File

@ -601,6 +601,16 @@ public class IslandManager {
LocationUtil.teleportPlayerToSpawn(all);
}
// TODO - Find a way to delete also offline players
if (skyblock.getFileManager().getConfig(new File(skyblock.getDataFolder(), "config.yml")).getFileConfiguration()
.getBoolean("Island.Deletion.ClearInventory", false)){
all.getInventory().clear();
}
if (skyblock.getFileManager().getConfig(new File(skyblock.getDataFolder(), "config.yml")).getFileConfiguration()
.getBoolean("Island.Deletion.ClearEnderChest", false)){
all.getEnderChest().clear();
}
if (cooldownEnabled) {
if (!all.hasPermission("fabledskyblock.bypass.cooldown") && !all.hasPermission("fabledskyblock.bypass.*") && !all.hasPermission("fabledskyblock.*")) {
skyblock.getCooldownManager().createPlayer(CooldownType.Creation, all);

View File

@ -38,6 +38,9 @@ Island:
TeleportTimeout: 1
# The distance between the islands
Distance: 1200
Deletion:
ClearInventory: false
ClearEnderChest: false
World:
# Delete the Island world when changing the liquid option.
# If lava disabled, the world will be a water world.