diff --git a/README.md b/README.md
old mode 100755
new mode 100644
index ed52b4e71..9f2ff6f6e
--- a/README.md
+++ b/README.md
@@ -1,61 +1,2 @@
-BSkyBlock
-==========
-
-[![Build Status](https://travis-ci.org/tastybento/bskyblock.svg?branch=master)](https://travis-ci.org/tastybento/bskyblock)
-![Lines Of Code](https://sonarcloud.io/api/project_badges/measure?project=us.tastybento%3Abskyblock&metric=ncloc)
-![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=us.tastybento%3Abskyblock&metric=sqale_rating)
-![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=us.tastybento%3Abskyblock&metric=reliability_rating)
-![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=us.tastybento%3Abskyblock&metric=security_rating)
-![Bugs](https://sonarcloud.io/api/project_badges/measure?project=us.tastybento%3Abskyblock&metric=bugs)
-
-
-A skyblock Bukkit plugin for Minecraft derived from the well-known ASkyBlock!
-This is a survival game where the player starts with an island in the sky.
-
-BSkyBlock (Better SkyBlock) represents a turning point on ASkyBlock's history : Tastybento and Poslovitch thought and designed together this complete rewrite in order to provide a whole new way to play Skyblock.
-
-**Discover today BSkyBlock, its gameplay overhaul, and enjoy the Skyblock revival!**
-
-Add-ons
-=======
-BSkyBlock is built to enable add-ons (plugins that use the BSkyBlock API). Here is a list of the current ones:
-
-* Level - provides island level calculation and a top ten
-* Welcome Warps - provides the warp sign feature
-
-You can find the projects on tastybento's GitHub.
-
-Bugs and Feature requests
-=========================
-File bug and feature requests here: https://github.com/tastybento/bskyblock/issues
-
-Note for developers
-===================
-This is an actively developed project but we are not currently accepting Pull Requests from non-collaborators. Once we have finished the main development, we'll be open to PR's.
-
-Development Builds
-==================
-Jenkins: https://ci.codemc.org/job/Tastybento/job/bskyblock/
-
-API
-===
-Maven dependency:
-```xml
-
-
- codemc-repo
- https://repo.codemc.org/repository/maven-public/
-
-
-
-
-
- us.tastybento
- bskyblock
- FC-0.74
- provided
-
-
-```
-
-You can find the javadoc here: https://ci.codemc.org/job/Tastybento/job/bskyblock/javadoc/
+# bentobox
+BentoBox Minecraft Plugin
diff --git a/config.yml b/config.yml
index 1cbaff04a..d2c46b4a7 100644
--- a/config.yml
+++ b/config.yml
@@ -1,10 +1,10 @@
-# BSkyBlock Configuration FC-0.7
+# BentoBox Configuration FC
# This config file is dynamic and saved when the server is shutdown.
# You cannot edit it while the server is running because changes will
# be lost! Use in-game settings GUI or edit when server is offline.
#
general:
- # BSkyBlock uses bStats.org to get global data about the plugin to help improving it.
+ # BentoBox uses bStats.org to get global data about the plugin to help improving it.
# bStats has nearly no effect on your server's performance and the sent data is completely
# anonymous so please consider twice if you really want to disable it.
metrics: true
@@ -62,272 +62,27 @@ general:
allow-obsidian-scooping: true
# Time in seconds that players have to confirm sensitive commands, e.g. island reset
confirmation-time: 20
-world:
- # Friendly name for this world. Used in admin commands. Must be a single word
- friendly-name: BSkyBlock
- # Name of the world - if it does not exist then it will be generated.
- # It acts like a prefix for nether and end (e.g. BSkyBlock, BSkyBlock_nether, BSkyBlock_end)
- world-name: BSkyBlock_world
- # World difficulty setting - PEACEFUL, EASY, NORMAL, HARD
- # Other plugins may override this setting
- difficulty: NORMAL
- # Radius of island in blocks. (So distance between islands is twice this)
- # Will be rounded up to the nearest 16 blocks.
- # It is the same for every dimension : Overworld, Nether and End.
- # This value cannot be changed mid-game and the plugin will not start if it is different.
- distance-between-islands: 64
- # Default protection range radius in blocks. Cannot be larger than distance.
- # Admins can change protection sizes for players individually using /bsadmin setrange
- # or set this permission: bskyblock.island.range.
- protection-range: 50
- # Start islands at these coordinates. This is where new islands will start in the
- # world. These must be a factor of your island distance, but the plugin will auto
- # calculate the closest location on the grid. Islands develop around this location
- # both positively and negatively in a square grid.
- # If none of this makes sense, leave it at 0,0.
- start-x: 0
- start-z: 0
- offset-x: 0
- offset-z: 0
- # Island height - Lowest is 5.
- # It is the y coordinate of the bedrock block in the schem
- island-height: 120
- # Use your own world generator for this world. In this case, the plugin will not generate
- # anything.
- use-own-generator: false
- # Sea height (don't changes this mid-game unless you delete the world)
- # Minimum is 0, which means you are playing Skyblock!
- # If sea height is less than about 10, then players will drop right through it
- # if it exists. Makes for an interesting variation on skyblock.
- sea-height: 0
- # Maximum number of islands in the world. Set to 0 for unlimited.
- # If the number of islands is greater than this number, no new island will be created.
- max-islands: 0
- # The default game mode for this world. Players will be set to this mode when they create
- # a new island for example. Options are SURVIVAL, CREATIVE, ADVENTURE, SPECTATOR
- default-game-mode: SURVIVAL
- nether:
- # Generate Nether - if this is false, the nether world will not be made and access to
- # the nether will not occur. Other plugins may still enable portal usage.
- # Note: Some challenges will not be possible if there is no nether.
- # Note that with a standard nether all players arrive at the same portal and entering a
- # portal will return them back to their islands.
- generate: true
- # Islands in Nether. Change to false for standard vanilla nether.
- islands: true
- # Nether trees are made if a player grows a tree in the nether (gravel and glowstone)
- # Applies to both vanilla and islands Nether
- trees: true
- # Make the nether roof, if false, there is nothing up there
- # Change to false if lag is a problem from the generation
- # Only applies to islands Nether
- roof: true
- # Nether spawn protection radius - this is the distance around the nether spawn
- # that will be protected from player interaction (breaking blocks, pouring lava etc.)
- # Minimum is 0 (not recommended), maximum is 100. Default is 25.
- # Only applies to vanilla nether
- spawn-radius: 25
- end:
- generate: true
- islands: true
- dragon-spawn: false
- # Removing mobs - this kills all monsters in the vicinity. Benefit is that it helps
- # players return to their island if the island has been overrun by monsters.
- # This setting is toggled in world flags and set by the settings GUI.
- # Mob white list - these mobs will NOT be removed when logging in or doing /island
- remove-mobs-whitelist:
- - ZOMBIE_VILLAGER
- - WITHER
- - PIG_ZOMBIE
- - ENDERMAN
- # World flags. These are boolean settings for various flags for this world
- flags:
- ENTER_EXIT_MESSAGES: true
- ISLAND_RESPAWN: true
- OFFLINE_REDSTONE: true
- REMOVE_MOBS: true
- # These are the default protection settings for new islands.
- # The value is the minimum island rank required allowed to do the action
- # Ranks are: Visitor = 0, Member = 900, Owner = 1000
- default-island-flags:
- HURT_ANIMALS: 900
- COLLECT_WATER: 900
- REDSTONE: 900
- BUCKET: 900
- BUTTON: 900
- LOCK: 0
- FIRE_EXTINGUISH: 900
- ENDER_PEARL: 900
- DOOR: 900
- BEACON: 900
- TRAPDOOR: 900
- PRESSURE_PLATE: 900
- FURNACE: 900
- PLACE_BLOCKS: 900
- ANVIL: 900
- FIRE: 900
- CRAFTING: 900
- BREEDING: 900
- SHEARING: 900
- ENCHANTING: 900
- HURT_VILLAGERS: 900
- SPAWN_EGGS: 900
- BED: 900
- COLLECT_LAVA: 900
- MILKING: 900
- LEVER: 900
- RIDING: 900
- HURT_MONSTERS: 900
- ARMOR_STAND: 900
- GATE: 900
- TRADING: 900
- EGGS: 900
- ITEM_DROP: 900
- PORTAL: 900
- CHEST: 900
- NOTE_BLOCK: 900
- LEASH: 900
- MOUNT_INVENTORY: 900
- BREAK_BLOCKS: 900
- CHORUS_FRUIT: 900
- ITEM_PICKUP: 900
- CROP_TRAMPLE: 900
- JUKEBOX: 900
- BREWING: 900
- # These are the default settings for new islands
- default-island-settings:
- PVP_END: false
- ANIMAL_SPAWN: true
- PVP_NETHER: false
- MONSTER_SPAWN: true
- FIRE_SPREAD: true
- PVP_OVERWORLD: false
- # These are the settings visible to users.
- visible-settings: []
- # Visitor banned commands - Visitors to islands cannot use these commands in this world
- visitor-banned-commands:
- - spawner
- - spawnmob
+panel:
+ close-on-click-outside: true
island:
- limits:
- entities: {}
- tile-entities: {}
- # Default max team size
- # Use this permission to set for specific user groups: askyblock.team.maxsize.
- # Permission size cannot be less than the default below.
- max-team-size: 4
- # Default maximum number of homes a player can have. Min = 1
- # Accessed via sethome or go
- # Use this permission to set for specific user groups: askyblock.island.maxhomes.
- max-homes: 1
- name:
- # Island naming
- # Only players with the TODO can name their island
- # It is displayed in the top ten and enter and exit announcements
- # It replaces the owner's name. Players can use & for color coding if they have the TODO permission
- # These set the minimum and maximum size of a name.
- min-length: 0
- max-length: 20
# How long a player must wait until they can rejoin a team island after being
# kicked in minutes. This slows the effectiveness of players repeating challenges
# by repetitively being invited to a team island.
invite-wait: 60
- reset:
- # How many resets a player is allowed (override with /asadmin clearreset )
- # Value of -1 means unlimited, 0 means hardcore - no resets.
- # Example, 2 resets means they get 2 resets or 3 islands lifetime
- reset-limit: -1
- # Kicked or leaving players lose resets
- # Players who leave a team will lose an island reset chance
- # If a player has zero resets left and leaves a team, they cannot make a new
- # island by themselves and can only join a team.
- # Leave this true to avoid players exploiting free islands
- leavers-lose-reset: false
- # Allow kicked players to keep their inventory.
- # If false, kicked player's inventory will be thrown at the island leader if the
- # kicked player is online and in the island world.
- kicked-keep-inventory: false
- on-join:
- # What the plugin should reset when the player joins or creates an island
- # Reset Money - if this is true, will reset the player's money to the starting money
- # Recommendation is that this is set to true, but if you run multi-worlds
- # make sure your economy handles multi-worlds too.
- money: false
- # Reset inventory - if true, the player's inventory will be cleared.
- # Note: if you have MultiInv running or a similar inventory control plugin, that
- # plugin may still reset the inventory when the world changes.
- inventory: false
- # Reset Ender Chest - if true, the player's Ender Chest will be cleared.
- ender-chest: false
- on-leave:
- # What the plugin should reset when the player leaves or is kicked from an island
- # Reset Money - if this is true, will reset the player's money to the starting money
- # Recommendation is that this is set to true, but if you run multi-worlds
- # make sure your economy handles multi-worlds too.
- money: false
- # Reset inventory - if true, the player's inventory will be cleared.
- # Note: if you have MultiInv running or a similar inventory control plugin, that
- # plugin may still reset the inventory when the world changes.
- inventory: false
- # Reset Ender Chest - if true, the player's Ender Chest will be cleared.
- ender-chest: false
require-confirmation:
- reset: true
# Ask the player to confirm the command he is using by typing it again.
# The 'wait' value is the number of seconds to wait for confirmation.
kick: true
kick-wait: 10
leave: true
leave-wait: 10
- # How long a player must wait before they can reset their island again in second
+ reset: true
+ # How long a player must wait before they can reset their island again in seconds
reset-wait: 300
- make-island-if-none: false
- # Immediately teleport player to their island (home 1 if it exists) when entering the world
- immediate-teleport-on-island: false
- # Have player's respawn on their island if they die
- respawn-on-island: false
- deaths:
- # Maximum number of deaths to count. The death count can be used by add-ons.
- max: 10
- sum-team: false
- # When a player joins a team, reset their death count
- team-join-reset: true
+ name:
+ # These set the minimum and maximum size of a name.
+ min-length: 4
+ max-length: 20
customranks: {}
-protection:
- # Geo restrict mobs.
- # Mobs that exit the island space where they were spawned will be removed.
- geo-limit-settings:
- - GHAST
- - BAT
- - BLAZE
- # Invincible visitors. List of damages that will not affect visitors.
- # Make list blank if visitors should receive all damages
- invincible-visitors:
- - BLOCK_EXPLOSION
- - CONTACT
- - CUSTOM
- - DROWNING
- - ENTITY_ATTACK
- - ENTITY_EXPLOSION
- - FALL
- - FALLING_BLOCK
- - FIRE
- - FIRE_TICK
- - LAVA
- - LIGHTNING
- - MAGIC
- - POISON
- - PROJECTILE
- - STARVATION
- - SUFFOCATION
- - THORNS
- - WITHER
- - DRAGON_BREATH
- - FLY_INTO_WALL
- - HOT_FLOOR
- - CRAMMING
- - VOID
-togglePvPCooldown: 0
-panel:
- close-on-click-outside: true
+# These settings should not be edited
uniqueId: config
diff --git a/plugin.yml b/plugin.yml
index 1d44d1c9d..3f725c6ee 100755
--- a/plugin.yml
+++ b/plugin.yml
@@ -1,5 +1,5 @@
-name: BSkyBlock
-main: us.tastybento.bskyblock.BSkyBlock
+name: BentoBox
+main: world.bentobox.bbox.BentoBox
version: ${version}
authors: [tastybento, Poslovitch]
@@ -8,143 +8,3 @@ softdepend: [PlaceholderAPI, MVdWPlaceholderAPI]
load: startup
loadbefore: [Multiverse-Core]
-
-permissions:
- bskyblock.*:
- default: false
- children:
- bskyblock.island.*:
- children:
- bskyblock.island:
- description: Allow island command usage
- default: true
- bskyblock.island.create:
- description: Allow island creation
- default: true
- bskyblock.island.home:
- description: Allow teleporting to player island
- default: true
- bskyblock.island.reset:
- description: Player can use the island reset or restart command
- default: true
- bskyblock.island.sethome:
- description: Let the player use the sethome command
- default: true
- bskyblock.island.info:
- description: Let the player check their island level
- default: true
- bskyblock.island.sethome:
- description: Let the player set their island teleport point
- default: true
- bskyblock.island.controlpanel:
- description: Allows usage of the island GUI
- default: true
- bskyblock.island.lock:
- description: Allows island locking
- default: true
- bskyblock.island.expel:
- description: Allows expelling of visitors
- default: true
- bskyblock.island.ban:
- description: Allows banning of visitors
- default: true
- bskyblock.island.settings:
- description: Player can see server settings
- default: true
- bskyblock.island.lang:
- description: Player can select a language
- default: true
- bskyblock.island.name:
- description: Player can set the name of their island
- default: true
- bskyblock.island.spawn:
- description: Player can use the island spawn command if spawn exists
- default: true
- bskyblock.island.reset:
- description: Player can use the island reset or restart command
- default: true
- bskyblock.island.team:
- description: Let a player use team commands
- default: true
- bskyblock.mod.*:
- children:
- bskyblock.mod.info:
- description: Let a moderator see info on a player
- default: op
- bskyblock.mod.resethome:
- description: Allows setting or reseting of a player's home position
- default: op
- bskyblock.mod.clearreset:
- description: Allow clearing of island reset limit
- default: false
- bskyblock.mod.tp:
- description: Allows teleport to an island
- default: op
- bskyblock.mod.bypassprotect:
- description: Allow moderator to bypass island protection
- default: op
- bskyblock.mod.bypassexpel:
- description: Allow moderator to bypass island expulsion
- default: op
- bskyblock.mod.topbreeders:
- description: Lists most populated islands current loaded
- default: op
- bskyblock.mod.lock:
- description: Locks or unlocks an island
- default: op
- bskyblock.mod.bypasslock:
- description: Bypasses an island lock
- default: op
- bskyblock.mod.team:
- description: Enables modification of teams via kick and add commands
- default: false
- bskyblock.mod.name:
- description: Enables naming of player's islands
- default: false
- bskyblock.mod.resetname:
- description: Enables reset of player's island names
- default: false
- bskyblock.admin.*:
- children:
- bskyblock.admin.clearresetall:
- description: Allow clearing of island reset limit of all players
- default: op
- bskyblock.admin.reload:
- description: Reload the config.yml
- default: op
- bskyblock.admin.delete:
- description: Let a player completely remove a player (including island)
- default: op
- bskyblock.admin.deleteisland:
- description: Let a player completely remove the island the player is on
- default: op
- bskyblock.admin.register:
- description: Let a player register the nearest island to another player.
- default: op
- bskyblock.admin.unregister:
- description: Removes a player from an island without deleting the island blocks.
- default: op
- bskyblock.admin.purge:
- description: Let a player purge old islands.
- default: op
- bskyblock.admin.setspawn:
- description: Allows use of spawn tools
- default: op
- bskyblock.admin.setrange:
- description: Allows setting of island protection range
- default: op
- bskyblock.admin.topbreeders:
- description: Lists most populated islands current loaded
- default: op
- bskyblock.admin.reserve:
- description: Reserves an empty spot for a player's next island
- default: op
- bskyblock.admin.settingsreset:
- description: Resets all the islands to default protection settings
- default: op
- bskyblock.admin.noban:
- description: Player cannot be banned from an island
- default: op
- bskyblock.admin.setlanguage:
- description: Resets all player languages and sets the default language
- default: op
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 28412a116..b3257bc1e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,12 +1,11 @@
-
4.0.0
- us.tastybento
- bskyblock
+ world.bentobox
+ bentobox
jar
- FC-0.79
- BSkyBlock
- The next generation of ASkyBlock
+ BentoBox
1.8
1.8
@@ -64,16 +63,38 @@
-
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 3.0.1
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 3.0.0
+
+ -Xdoclint:none
+
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
@@ -180,4 +201,5 @@
https://hub.spigotmc.org/nexus/content/repositories/snapshots
+ 1.0
diff --git a/schems/end-island.schem b/schems/end-island.schem
deleted file mode 100644
index 796334e67..000000000
Binary files a/schems/end-island.schem and /dev/null differ
diff --git a/schems/island.schem b/schems/island.schem
deleted file mode 100644
index 55a0e2f58..000000000
Binary files a/schems/island.schem and /dev/null differ
diff --git a/schems/nether-island.schem b/schems/nether-island.schem
deleted file mode 100644
index 5cd7841c3..000000000
Binary files a/schems/nether-island.schem and /dev/null differ
diff --git a/src/main/java/us/tastybento/bskyblock/Settings.java b/src/main/java/us/tastybento/bskyblock/Settings.java
deleted file mode 100644
index c264d7fa0..000000000
--- a/src/main/java/us/tastybento/bskyblock/Settings.java
+++ /dev/null
@@ -1,1503 +0,0 @@
-package us.tastybento.bskyblock;
-
-import java.util.ArrayList;
-import java.util.EnumMap;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
-import java.util.Set;
-
-import org.bukkit.Difficulty;
-import org.bukkit.GameMode;
-import org.bukkit.entity.EntityType;
-
-import us.tastybento.bskyblock.api.addons.Addon;
-import us.tastybento.bskyblock.api.configuration.ConfigComment;
-import us.tastybento.bskyblock.api.configuration.ConfigEntry;
-import us.tastybento.bskyblock.api.configuration.StoreAt;
-import us.tastybento.bskyblock.api.configuration.WorldSettings;
-import us.tastybento.bskyblock.api.flags.Flag;
-import us.tastybento.bskyblock.database.BSBDbSetup.DatabaseType;
-import us.tastybento.bskyblock.database.objects.DataObject;
-import us.tastybento.bskyblock.database.objects.adapters.Adapter;
-import us.tastybento.bskyblock.database.objects.adapters.FlagSerializer;
-import us.tastybento.bskyblock.database.objects.adapters.FlagSerializer2;
-
-/**
- * All the plugin settings are here
- * @author Tastybento
- */
-@StoreAt(filename="config.yml") // Explicitly call out what name this should have.
-@ConfigComment("BSkyBlock Configuration [version]")
-@ConfigComment("This config file is dynamic and saved when the server is shutdown.")
-@ConfigComment("You cannot edit it while the server is running because changes will")
-@ConfigComment("be lost! Use in-game settings GUI or edit when server is offline.")
-@ConfigComment("")
-public class Settings implements DataObject, WorldSettings {
-
- // ---------------------------------------------
-
- /* GENERAL */
- @ConfigComment("BSkyBlock uses bStats.org to get global data about the plugin to help improving it.")
- @ConfigComment("bStats has nearly no effect on your server's performance and the sent data is completely")
- @ConfigComment("anonymous so please consider twice if you really want to disable it.")
- @ConfigEntry(path = "general.metrics")
- private boolean metrics = true;
-
- @ConfigComment("Check for updates - this will tell Ops and the console if there is a new")
- @ConfigComment("version available. It contacts dev.bukkit.org to request the latest version")
- @ConfigComment("info. It does not download the latest version or change any files")
- @ConfigEntry(path = "general.check-updates")
- private boolean checkUpdates = true;
-
- @ConfigComment("Default language for new players.")
- @ConfigComment("This is the filename in the locale folder without .yml.")
- @ConfigComment("If this does not exist, the default en-US will be used.")
- @ConfigEntry(path = "general.default-language")
- private String defaultLanguage = "en-US";
-
- @ConfigComment("Use economy or not. If true, an economy plugin is required. If false, no money is used or give.")
- @ConfigComment("If there is no economy plugin present anyway, money will be automatically disabled.")
- @ConfigEntry(path = "general.use-economy")
- private boolean useEconomy = true;
-
- @ConfigComment("Starting money - this is how much money new players will have as their")
- @ConfigComment("balance at the start of an island.")
- @ConfigEntry(path = "general.starting-money")
- private double startingMoney = 10.0;
-
- // Purge
- @ConfigComment("Only islands below this level will be removed if they are abandoned and admins issue the purge command")
- @ConfigEntry(path = "general.purge.max-island-level")
- private int purgeMaxIslandLevel = 50;
-
- @ConfigComment("Remove user data when its island gets purged.")
- @ConfigComment("Helps a lot to avoid huge backups and can save some performance on startup,")
- @ConfigComment("but the player settings and data will be reset.")
- @ConfigEntry(path = "general.purge.remove-user-data")
- private boolean purgeRemoveUserData = false;
-
- // Database
- @ConfigComment("FLATFILE, MYSQL, MONGO")
- @ConfigComment("if you use MONGO, you must also run the BSBMongo plugin (not addon)")
- @ConfigComment("See https://github.com/tastybento/bsbMongo/releases/")
- @ConfigEntry(path = "general.database.type")
- private DatabaseType databaseType = DatabaseType.FLATFILE;
-
- @ConfigEntry(path = "general.database.host")
- private String dbHost = "localhost";
-
- @ConfigComment("Port 3306 is MySQL's default. Port 27017 is MongoDB's default.")
- @ConfigEntry(path = "general.database.port")
- private int dbPort = 3306;
-
- @ConfigEntry(path = "general.database.name")
- private String dbName = "BSkyBlock";
-
- @ConfigEntry(path = "general.database.username")
- private String dbUsername = "username";
-
- @ConfigEntry(path = "general.database.password")
- private String dbPassword = "password";
-
- @ConfigComment("How often the data will be saved to file in mins. Default is 5 minutes.")
- @ConfigComment("This helps prevent issues if the server crashes.")
- @ConfigComment("Data is also saved at important points in the game.")
- @ConfigEntry(path = "general.database.backup-period")
- private int databaseBackupPeriod = 5;
-
- @ConfigComment("Recover super flat - if the generator does not run for some reason, you can get")
- @ConfigComment("super flat chunks (grass). To remove automatically, select this option. Turn off")
- @ConfigComment("if there are no more because it may cause lag.")
- @ConfigComment("This will regenerate any chunks with bedrock at y=0 when they are loaded")
- @ConfigEntry(path = "general.recover-super-flat")
- private boolean recoverSuperFlat = false;
-
- @ConfigComment("Mute death messages")
- @ConfigEntry(path = "general.mute-death-messages")
- private boolean muteDeathMessages = false;
-
- @ConfigComment("Allow FTB Autonomous Activator to work (will allow a pseudo player [CoFH] to place and break blocks and hang items)")
- @ConfigComment("Add other fake player names here if required")
- @ConfigEntry(path = "general.fakeplayers")
- private Set fakePlayers = new HashSet<>();
-
- @ConfigComment("Allow obsidian to be scooped up with an empty bucket back into lava")
- @ConfigComment("This only works if there is a single block of obsidian (no obsidian within 10 blocks)")
- @ConfigComment("Recommendation is to keep this true so that newbies don't bother you or reset their")
- @ConfigComment("island unnecessarily.")
- @ConfigEntry(path = "general.allow-obsidian-scooping")
- private boolean allowObsidianScooping = true;
-
- @ConfigComment("Time in seconds that players have to confirm sensitive commands, e.g. island reset")
- @ConfigEntry(path = "general.confirmation-time")
- private int confirmationTime = 20;
-
- // ---------------------------------------------
-
- /* WORLD */
- @ConfigComment("Friendly name for this world. Used in admin commands. Must be a single word")
- @ConfigEntry(path = "world.friendly-name", needsReset = true)
- private String friendlyName = "BSkyBlock";
-
- @ConfigComment("Name of the world - if it does not exist then it will be generated.")
- @ConfigComment("It acts like a prefix for nether and end (e.g. BSkyBlock, BSkyBlock_nether, BSkyBlock_end)")
- @ConfigEntry(path = "world.world-name", needsReset = true)
- private String worldName = "BSkyBlock-world";
-
- @ConfigComment("World difficulty setting - PEACEFUL, EASY, NORMAL, HARD")
- @ConfigComment("Other plugins may override this setting")
- @ConfigEntry(path = "world.difficulty")
- private Difficulty difficulty;
-
- @ConfigComment("Radius of island in blocks. (So distance between islands is twice this)")
- @ConfigComment("Will be rounded up to the nearest 16 blocks.")
- @ConfigComment("It is the same for every dimension : Overworld, Nether and End.")
- @ConfigComment("This value cannot be changed mid-game and the plugin will not start if it is different.")
- @ConfigEntry(path = "world.distance-between-islands", needsReset = true)
- private int islandDistance = 200;
-
- @ConfigComment("Default protection range radius in blocks. Cannot be larger than distance.")
- @ConfigComment("Admins can change protection sizes for players individually using /bsadmin setrange")
- @ConfigComment("or set this permission: bskyblock.island.range.")
- @ConfigEntry(path = "world.protection-range", overrideOnChange = true)
- private int islandProtectionRange = 100;
-
- @ConfigComment("Start islands at these coordinates. This is where new islands will start in the")
- @ConfigComment("world. These must be a factor of your island distance, but the plugin will auto")
- @ConfigComment("calculate the closest location on the grid. Islands develop around this location")
- @ConfigComment("both positively and negatively in a square grid.")
- @ConfigComment("If none of this makes sense, leave it at 0,0.")
- @ConfigEntry(path = "world.start-x", needsReset = true)
- private int islandStartX = 0;
-
- @ConfigEntry(path = "world.start-z", needsReset = true)
- private int islandStartZ = 0;
-
- @ConfigEntry(path = "world.offset-x")
- private int islandXOffset;
- @ConfigEntry(path = "world.offset-z")
- private int islandZOffset;
-
- @ConfigComment("Island height - Lowest is 5.")
- @ConfigComment("It is the y coordinate of the bedrock block in the schem")
- @ConfigEntry(path = "world.island-height")
- private int islandHeight = 100;
-
- @ConfigComment("Use your own world generator for this world. In this case, the plugin will not generate")
- @ConfigComment("anything.")
- @ConfigEntry(path = "world.use-own-generator")
- private boolean useOwnGenerator;
-
- @ConfigComment("Sea height (don't changes this mid-game unless you delete the world)")
- @ConfigComment("Minimum is 0, which means you are playing Skyblock!")
- @ConfigComment("If sea height is less than about 10, then players will drop right through it")
- @ConfigComment("if it exists. Makes for an interesting variation on skyblock.")
- @ConfigEntry(path = "world.sea-height")
- private int seaHeight = 0;
-
- @ConfigComment("Maximum number of islands in the world. Set to 0 for unlimited. ")
- @ConfigComment("If the number of islands is greater than this number, no new island will be created.")
- @ConfigEntry(path = "world.max-islands")
- private int maxIslands = -1;
-
- @ConfigComment("The default game mode for this world. Players will be set to this mode when they create")
- @ConfigComment("a new island for example. Options are SURVIVAL, CREATIVE, ADVENTURE, SPECTATOR")
- @ConfigEntry(path = "world.default-game-mode")
- private GameMode defaultGameMode = GameMode.SURVIVAL;
-
- // Nether
- @ConfigComment("Generate Nether - if this is false, the nether world will not be made and access to")
- @ConfigComment("the nether will not occur. Other plugins may still enable portal usage.")
- @ConfigComment("Note: Some challenges will not be possible if there is no nether.")
- @ConfigComment("Note that with a standard nether all players arrive at the same portal and entering a")
- @ConfigComment("portal will return them back to their islands.")
- @ConfigEntry(path = "world.nether.generate")
- private boolean netherGenerate = true;
-
- @ConfigComment("Islands in Nether. Change to false for standard vanilla nether.")
- @ConfigEntry(path = "world.nether.islands", needsReset = true)
- private boolean netherIslands = true;
-
- @ConfigComment("Nether trees are made if a player grows a tree in the nether (gravel and glowstone)")
- @ConfigComment("Applies to both vanilla and islands Nether")
- @ConfigEntry(path = "world.nether.trees")
- private boolean netherTrees = true;
-
- @ConfigComment("Make the nether roof, if false, there is nothing up there")
- @ConfigComment("Change to false if lag is a problem from the generation")
- @ConfigComment("Only applies to islands Nether")
- @ConfigEntry(path = "world.nether.roof")
- private boolean netherRoof = true;
-
- @ConfigComment("Nether spawn protection radius - this is the distance around the nether spawn")
- @ConfigComment("that will be protected from player interaction (breaking blocks, pouring lava etc.)")
- @ConfigComment("Minimum is 0 (not recommended), maximum is 100. Default is 25.")
- @ConfigComment("Only applies to vanilla nether")
- @ConfigEntry(path = "world.nether.spawn-radius")
- private int netherSpawnRadius = 32;
-
- // End
- @ConfigEntry(path = "world.end.generate")
- private boolean endGenerate = true;
-
- @ConfigEntry(path = "world.end.islands", needsReset = true)
- private boolean endIslands = true;
-
- @ConfigEntry(path = "world.end.dragon-spawn")
- private boolean dragonSpawn = false;
-
- @ConfigComment("Removing mobs - this kills all monsters in the vicinity. Benefit is that it helps")
- @ConfigComment("players return to their island if the island has been overrun by monsters.")
- @ConfigComment("This setting is toggled in world flags and set by the settings GUI.")
- @ConfigComment("Mob white list - these mobs will NOT be removed when logging in or doing /island")
- @ConfigEntry(path = "world.remove-mobs-whitelist")
- private Set removeMobsWhitelist = new HashSet<>();
-
- @ConfigComment("World flags. These are boolean settings for various flags for this world")
- @ConfigEntry(path = "world.flags")
- private Map worldFlags = new HashMap<>();
-
- @ConfigComment("These are the default protection settings for new islands.")
- @ConfigComment("The value is the minimum island rank required allowed to do the action")
- @ConfigComment("Ranks are: Visitor = 0, Member = 900, Owner = 1000")
- @ConfigEntry(path = "world.default-island-flags")
- @Adapter(FlagSerializer.class)
- private Map defaultIslandFlags = new HashMap<>();
-
- @ConfigComment("These are the default settings for new islands")
- @ConfigEntry(path = "world.default-island-settings")
- @Adapter(FlagSerializer2.class)
- private Map defaultIslandSettings = new HashMap<>();
-
- @ConfigComment("These are the settings visible to users.")
- @ConfigEntry(path = "world.visible-settings")
- private List visibleSettings = new ArrayList<>();
-
- @ConfigComment("Visitor banned commands - Visitors to islands cannot use these commands in this world")
- @ConfigEntry(path = "world.visitor-banned-commands")
- private List visitorBannedCommands = new ArrayList<>();
-
- // ---------------------------------------------
-
- /* ISLAND */
- // Entities
- @ConfigEntry(path = "island.limits.entities")
- private Map entityLimits = new EnumMap<>(EntityType.class);
- @ConfigEntry(path = "island.limits.tile-entities")
- private Map tileEntityLimits = new HashMap<>();
-
- @ConfigComment("Default max team size")
- @ConfigComment("Use this permission to set for specific user groups: askyblock.team.maxsize.")
- @ConfigComment("Permission size cannot be less than the default below. ")
- @ConfigEntry(path = "island.max-team-size")
- private int maxTeamSize = 4;
- @ConfigComment("Default maximum number of homes a player can have. Min = 1")
- @ConfigComment("Accessed via sethome or go ")
- @ConfigComment("Use this permission to set for specific user groups: askyblock.island.maxhomes.")
- @ConfigEntry(path = "island.max-homes")
- private int maxHomes = 5;
- @ConfigComment("Island naming")
- @ConfigComment("Only players with the TODO can name their island")
- @ConfigComment("It is displayed in the top ten and enter and exit announcements")
- @ConfigComment("It replaces the owner's name. Players can use & for color coding if they have the TODO permission")
- @ConfigComment("These set the minimum and maximum size of a name.")
- @ConfigEntry(path = "island.name.min-length")
- private int nameMinLength = 4;
- @ConfigEntry(path = "island.name.max-length")
- private int nameMaxLength = 20;
- @ConfigComment("How long a player must wait until they can rejoin a team island after being")
- @ConfigComment("kicked in minutes. This slows the effectiveness of players repeating challenges")
- @ConfigComment("by repetitively being invited to a team island.")
- @ConfigEntry(path = "island.invite-wait")
- private int inviteWait = 60;
-
- // Reset
- @ConfigComment("How many resets a player is allowed (override with /asadmin clearreset )")
- @ConfigComment("Value of -1 means unlimited, 0 means hardcore - no resets.")
- @ConfigComment("Example, 2 resets means they get 2 resets or 3 islands lifetime")
- @ConfigEntry(path = "island.reset.reset-limit")
- private int resetLimit = -1;
-
- @ConfigEntry(path = "island.require-confirmation.reset")
- private boolean resetConfirmation = true;
-
- @ConfigComment("How long a player must wait before they can reset their island again in second")
- @ConfigEntry(path = "island.reset-wait")
- private long resetWait = 300;
-
- @ConfigComment("Kicked or leaving players lose resets")
- @ConfigComment("Players who leave a team will lose an island reset chance")
- @ConfigComment("If a player has zero resets left and leaves a team, they cannot make a new")
- @ConfigComment("island by themselves and can only join a team.")
- @ConfigComment("Leave this true to avoid players exploiting free islands")
- @ConfigEntry(path = "island.reset.leavers-lose-reset")
- private boolean leaversLoseReset = false;
-
- @ConfigComment("Allow kicked players to keep their inventory.")
- @ConfigComment("If false, kicked player's inventory will be thrown at the island leader if the")
- @ConfigComment("kicked player is online and in the island world.")
- @ConfigEntry(path = "island.reset.kicked-keep-inventory")
- private boolean kickedKeepInventory = false;
-
- @ConfigComment("What the plugin should reset when the player joins or creates an island")
- @ConfigComment("Reset Money - if this is true, will reset the player's money to the starting money")
- @ConfigComment("Recommendation is that this is set to true, but if you run multi-worlds")
- @ConfigComment("make sure your economy handles multi-worlds too.")
- @ConfigEntry(path = "island.reset.on-join.money")
- private boolean onJoinResetMoney = false;
-
- @ConfigComment("Reset inventory - if true, the player's inventory will be cleared.")
- @ConfigComment("Note: if you have MultiInv running or a similar inventory control plugin, that")
- @ConfigComment("plugin may still reset the inventory when the world changes.")
- @ConfigEntry(path = "island.reset.on-join.inventory")
- private boolean onJoinResetInventory = false;
-
- @ConfigComment("Reset Ender Chest - if true, the player's Ender Chest will be cleared.")
- @ConfigEntry(path = "island.reset.on-join.ender-chest")
- private boolean onJoinResetEnderChest = false;
-
- @ConfigComment("What the plugin should reset when the player leaves or is kicked from an island")
- @ConfigComment("Reset Money - if this is true, will reset the player's money to the starting money")
- @ConfigComment("Recommendation is that this is set to true, but if you run multi-worlds")
- @ConfigComment("make sure your economy handles multi-worlds too.")
- @ConfigEntry(path = "island.reset.on-leave.money")
- private boolean onLeaveResetMoney = false;
-
- @ConfigComment("Reset inventory - if true, the player's inventory will be cleared.")
- @ConfigComment("Note: if you have MultiInv running or a similar inventory control plugin, that")
- @ConfigComment("plugin may still reset the inventory when the world changes.")
- @ConfigEntry(path = "island.reset.on-leave.inventory")
- private boolean onLeaveResetInventory = false;
-
- @ConfigComment("Reset Ender Chest - if true, the player's Ender Chest will be cleared.")
- @ConfigEntry(path = "island.reset.on-leave.ender-chest")
- private boolean onLeaveResetEnderChest = false;
-
- @ConfigEntry(path = "island.make-island-if-none")
- private boolean makeIslandIfNone = false;
- @ConfigComment("Immediately teleport player to their island (home 1 if it exists) when entering the world")
- @ConfigEntry(path = "island.immediate-teleport-on-island")
- private boolean immediateTeleportOnIsland = false;
- @ConfigComment("Have player's respawn on their island if they die")
- @ConfigEntry(path = "island.respawn-on-island")
- private boolean respawnOnIsland = true;
-
- // Deaths
- @ConfigComment("Maximum number of deaths to count. The death count can be used by add-ons.")
- @ConfigEntry(path = "island.deaths.max")
- private int deathsMax = 10;
-
- @ConfigEntry(path = "island.deaths.sum-team")
- private boolean deathsSumTeam = false;
-
- @ConfigComment("When a player joins a team, reset their death count")
- @ConfigEntry(path = "island.deaths.team-join-reset")
- private boolean teamJoinDeathReset = true;
-
- // Ranks
- @ConfigEntry(path = "island.customranks")
- private Map customRanks = new HashMap<>();
-
- // ---------------------------------------------
-
- /* PROTECTION */
- private int togglePvPCooldown;
-
- @ConfigComment("Geo restrict mobs.")
- @ConfigComment("Mobs that exit the island space where they were spawned will be removed.")
- @ConfigEntry(path = "protection.geo-limit-settings")
- private List geoLimitSettings = new ArrayList<>();
-
- // Invincible visitor settings
- @ConfigComment("Invincible visitors. List of damages that will not affect visitors.")
- @ConfigComment("Make list blank if visitors should receive all damages")
- @ConfigEntry(path = "protection.invincible-visitors")
- private List ivSettings = new ArrayList<>();
-
- // ---------------------------------------------
-
- // Timeout for team kick and leave commands
- @ConfigComment("Ask the player to confirm the command he is using by typing it again.")
- @ConfigComment("The 'wait' value is the number of seconds to wait for confirmation.")
- @ConfigEntry(path = "island.require-confirmation.kick")
- private boolean kickConfirmation = true;
-
- @ConfigEntry(path = "island.require-confirmation.kick-wait")
- private long kickWait = 10L;
-
- @ConfigEntry(path = "island.require-confirmation.leave")
- private boolean leaveConfirmation = true;
-
- @ConfigEntry(path = "island.require-confirmation.leave-wait")
- private long leaveWait = 10L;
-
- @ConfigEntry(path = "panel.close-on-click-outside")
- private boolean closePanelOnClickOutside = true;
-
- //---------------------------------------------------------------------------------------/
- @ConfigComment("These settings should not be edited")
- @ConfigEntry(path = "do-not-edit-these-settings.reset-epoch")
- private long resetEpoch = 0;
-
- private String uniqueId = "config";
-
- // Getters and setters
-
- /**
- * @return the metrics
- */
- public boolean isMetrics() {
- return metrics;
- }
- /**
- * @param metrics the metrics to set
- */
- public void setMetrics(boolean metrics) {
- this.metrics = metrics;
- }
- /**
- * @return the startingMoney
- */
- public double getStartingMoney() {
- return startingMoney;
- }
- /**
- * @param startingMoney the startingMoney to set
- */
- public void setStartingMoney(double startingMoney) {
- this.startingMoney = startingMoney;
- }
- /**
- * @return the recoverSuperFlat
- */
- public boolean isRecoverSuperFlat() {
- return recoverSuperFlat;
- }
- /**
- * @param recoverSuperFlat the recoverSuperFlat to set
- */
- public void setRecoverSuperFlat(boolean recoverSuperFlat) {
- this.recoverSuperFlat = recoverSuperFlat;
- }
- /**
- * @return the muteDeathMessages
- */
- public boolean isMuteDeathMessages() {
- return muteDeathMessages;
- }
- /**
- * @param muteDeathMessages the muteDeathMessages to set
- */
- public void setMuteDeathMessages(boolean muteDeathMessages) {
- this.muteDeathMessages = muteDeathMessages;
- }
- /**
- * @return the customRanks
- */
- public Map getCustomRanks() {
- return customRanks;
- }
- /**
- * @return the databaseBackupPeriod
- */
- public int getDatabaseBackupPeriod() {
- return databaseBackupPeriod;
- }
- /**
- * @return the databaseType
- */
- public DatabaseType getDatabaseType() {
- return databaseType;
- }
- /**
- * @return the dbHost
- */
- public String getDbHost() {
- return dbHost;
- }
- /**
- * @return the dbName
- */
- public String getDbName() {
- return dbName;
- }
- /**
- * @return the dbPassword
- */
- public String getDbPassword() {
- return dbPassword;
- }
- /**
- * @return the dbPort
- */
- public int getDbPort() {
- return dbPort;
- }
- /**
- * @return the dbUsername
- */
- public String getDbUsername() {
- return dbUsername;
- }
- /**
- * @return the deathsMax
- */
- public int getDeathsMax() {
- return deathsMax;
- }
- /**
- * @param teamJoinDeathReset the teamJoinDeathReset to set
- */
- public void setTeamJoinDeathReset(boolean teamJoinDeathReset) {
- this.teamJoinDeathReset = teamJoinDeathReset;
- }
- /**
- * @return the defaultLanguage
- */
- public String getDefaultLanguage() {
- return defaultLanguage;
- }
- /**
- * @return the entityLimits
- */
- @Override
- public Map getEntityLimits() {
- return entityLimits;
- }
- /**
- * Number of minutes to wait
- * @return the inviteWait
- */
- public int getInviteWait() {
- return inviteWait;
- }
- /**
- * @return the islandDistance
- */
- @Override
- public int getIslandDistance() {
- return islandDistance;
- }
- /**
- * @return the islandHeight
- */
- @Override
- public int getIslandHeight() {
- return islandHeight;
- }
- /**
- * @return the islandProtectionRange
- */
- @Override
- public int getIslandProtectionRange() {
- return islandProtectionRange;
- }
- /**
- * @return the islandStartX
- */
- @Override
- public int getIslandStartX() {
- return islandStartX;
- }
- /**
- * @return the islandStartZ
- */
- @Override
- public int getIslandStartZ() {
- return islandStartZ;
- }
- /**
- * @return the islandXOffset
- */
- @Override
- public int getIslandXOffset() {
- return islandXOffset;
- }
- /**
- * @return the islandZOffset
- */
- @Override
- public int getIslandZOffset() {
- return islandZOffset;
- }
- /**
- * @return the kickWait
- */
- public long getKickWait() {
- return kickWait;
- }
- /**
- * @return the leaveWait
- */
- public long getLeaveWait() {
- return leaveWait;
- }
- /**
- * @return the maxHomes
- */
- @Override
- public int getMaxHomes() {
- return maxHomes;
- }
- /**
- * @return the maxIslands
- */
- @Override
- public int getMaxIslands() {
- return maxIslands;
- }
- /**
- * @return the maxTeamSize
- */
- @Override
- public int getMaxTeamSize() {
- return maxTeamSize;
- }
- /**
- * @return the nameMaxLength
- */
- public int getNameMaxLength() {
- return nameMaxLength;
- }
- /**
- * @return the nameMinLength
- */
- public int getNameMinLength() {
- return nameMinLength;
- }
- /**
- * @return the netherSpawnRadius
- */
- @Override
- public int getNetherSpawnRadius() {
- return netherSpawnRadius;
- }
- /**
- * @return the purgeMaxIslandLevel
- */
- public int getPurgeMaxIslandLevel() {
- return purgeMaxIslandLevel;
- }
- /**
- * @return the resetLimit
- */
- @Override
- public int getResetLimit() {
- return resetLimit;
- }
- /**
- * @return the resetWait
- */
- public long getResetWait() {
- return resetWait;
- }
- /**
- * @return the seaHeight
- */
- @Override
- public int getSeaHeight() {
- return seaHeight;
- }
- /**
- * @return the tileEntityLimits
- */
- @Override
- public Map getTileEntityLimits() {
- return tileEntityLimits;
- }
- /**
- * @return the togglePvPCooldown
- */
- public int getTogglePvPCooldown() {
- return togglePvPCooldown;
- }
- /**
- * @return the uniqueId
- */
- @Override
- public String getUniqueId() {
- return uniqueId;
- }
- /**
- * @return the worldName
- */
- @Override
- public String getWorldName() {
- return worldName;
- }
- /**
- * @return the allowObsidianScooping
- */
- public boolean isAllowObsidianScooping() {
- return allowObsidianScooping;
- }
- /**
- * @return the checkUpdates
- */
- public boolean isCheckUpdates() {
- return checkUpdates;
- }
- /**
- * @return the deathsSumTeam
- */
- public boolean isDeathsSumTeam() {
- return deathsSumTeam;
- }
- /**
- * @return the endGenerate
- */
- @Override
- public boolean isEndGenerate() {
- return endGenerate;
- }
- /**
- * @return the endIslands
- */
- @Override
- public boolean isEndIslands() {
- return endIslands;
- }
- /**
- * @return the immediateTeleportOnIsland
- */
- public boolean isImmediateTeleportOnIsland() {
- return immediateTeleportOnIsland;
- }
- /**
- * @return the kickConfirmation
- */
- public boolean isKickConfirmation() {
- return kickConfirmation;
- }
- /**
- * @return the kickedKeepInventory
- */
- public boolean isKickedKeepInventory() {
- return kickedKeepInventory;
- }
- /**
- * @return the leaveConfirmation
- */
- public boolean isLeaveConfirmation() {
- return leaveConfirmation;
- }
- /**
- * @return the leaversLoseReset
- */
- public boolean isLeaversLoseReset() {
- return leaversLoseReset;
- }
- /**
- * @return the makeIslandIfNone
- */
- public boolean isMakeIslandIfNone() {
- return makeIslandIfNone;
- }
- /**
- * @return the netherGenerate
- */
- @Override
- public boolean isNetherGenerate() {
- return netherGenerate;
- }
- /**
- * @return the netherIslands
- */
- @Override
- public boolean isNetherIslands() {
- return netherIslands;
- }
- /**
- * @return the netherRoof
- */
- public boolean isNetherRoof() {
- return netherRoof;
- }
- /**
- * @return the netherTrees
- */
- @Override
- public boolean isNetherTrees() {
- return netherTrees;
- }
- /**
- * @return the purgeRemoveUserData
- */
- public boolean isPurgeRemoveUserData() {
- return purgeRemoveUserData;
- }
- /**
- * @return the resetConfirmation
- */
- public boolean isResetConfirmation() {
- return resetConfirmation;
- }
- /**
- * @return the respawnOnIsland
- */
- public boolean isRespawnOnIsland() {
- return respawnOnIsland;
- }
- /**
- * @return the useEconomy
- */
- public boolean isUseEconomy() {
- return useEconomy;
- }
- /**
- * @return the useOwnGenerator
- */
- @Override
- public boolean isUseOwnGenerator() {
- return useOwnGenerator;
- }
- /**
- * @param allowObsidianScooping the allowObsidianScooping to set
- */
- public void setAllowObsidianScooping(boolean allowObsidianScooping) {
- this.allowObsidianScooping = allowObsidianScooping;
- }
- /**
- * @param checkUpdates the checkUpdates to set
- */
- public void setCheckUpdates(boolean checkUpdates) {
- this.checkUpdates = checkUpdates;
- }
- /**
- * @param customRanks the customRanks to set
- */
- public void setCustomRanks(Map customRanks) {
- this.customRanks = customRanks;
- }
- /**
- * @param databaseBackupPeriod the databaseBackupPeriod to set
- */
- public void setDatabaseBackupPeriod(int databaseBackupPeriod) {
- this.databaseBackupPeriod = databaseBackupPeriod;
- }
- /**
- * @param databaseType the databaseType to set
- */
- public void setDatabaseType(DatabaseType databaseType) {
- this.databaseType = databaseType;
- }
- /**
- * @param dbHost the dbHost to set
- */
- public void setDbHost(String dbHost) {
- this.dbHost = dbHost;
- }
- /**
- * @param dbName the dbName to set
- */
- public void setDbName(String dbName) {
- this.dbName = dbName;
- }
- /**
- * @param dbPassword the dbPassword to set
- */
- public void setDbPassword(String dbPassword) {
- this.dbPassword = dbPassword;
- }
- /**
- * @param dbPort the dbPort to set
- */
- public void setDbPort(int dbPort) {
- this.dbPort = dbPort;
- }
- /**
- * @param dbUsername the dbUsername to set
- */
- public void setDbUsername(String dbUsername) {
- this.dbUsername = dbUsername;
- }
- /**
- * @param deathsMax the deathsMax to set
- */
- public void setDeathsMax(int deathsMax) {
- this.deathsMax = deathsMax;
- }
- /**
- * @param deathsSumTeam the deathsSumTeam to set
- */
- public void setDeathsSumTeam(boolean deathsSumTeam) {
- this.deathsSumTeam = deathsSumTeam;
- }
- /**
- * @param defaultLanguage the defaultLanguage to set
- */
- public void setDefaultLanguage(String defaultLanguage) {
- this.defaultLanguage = defaultLanguage;
- }
- /**
- * @param endGenerate the endGenerate to set
- */
- public void setEndGenerate(boolean endGenerate) {
- this.endGenerate = endGenerate;
- }
- /**
- * @param endIslands the endIslands to set
- */
- public void setEndIslands(boolean endIslands) {
- this.endIslands = endIslands;
- }
- /**
- * @param entityLimits the entityLimits to set
- */
- public void setEntityLimits(Map entityLimits) {
- this.entityLimits = entityLimits;
- }
- /**
- * @param immediateTeleportOnIsland the immediateTeleportOnIsland to set
- */
- public void setImmediateTeleportOnIsland(boolean immediateTeleportOnIsland) {
- this.immediateTeleportOnIsland = immediateTeleportOnIsland;
- }
- /**
- * @param inviteWait the inviteWait to set
- */
- public void setInviteWait(int inviteWait) {
- this.inviteWait = inviteWait;
- }
- /**
- * @param islandDistance the islandDistance to set
- */
- public void setIslandDistance(int islandDistance) {
- this.islandDistance = islandDistance;
- }
- /**
- * @param islandHeight the islandHeight to set
- */
- public void setIslandHeight(int islandHeight) {
- this.islandHeight = islandHeight;
- }
- /**
- * @param islandProtectionRange the islandProtectionRange to set
- */
- public void setIslandProtectionRange(int islandProtectionRange) {
- this.islandProtectionRange = islandProtectionRange;
- }
- /**
- * @param islandStartX the islandStartX to set
- */
- public void setIslandStartX(int islandStartX) {
- this.islandStartX = islandStartX;
- }
- /**
- * @param islandStartZ the islandStartZ to set
- */
- public void setIslandStartZ(int islandStartZ) {
- this.islandStartZ = islandStartZ;
- }
- /**
- * @param islandXOffset the islandXOffset to set
- */
- public void setIslandXOffset(int islandXOffset) {
- this.islandXOffset = islandXOffset;
- }
- /**
- * @param islandZOffset the islandZOffset to set
- */
- public void setIslandZOffset(int islandZOffset) {
- this.islandZOffset = islandZOffset;
- }
- /**
- * @param kickConfirmation the kickConfirmation to set
- */
- public void setKickConfirmation(boolean kickConfirmation) {
- this.kickConfirmation = kickConfirmation;
- }
- /**
- * @param kickedKeepInventory the kickedKeepInventory to set
- */
- public void setKickedKeepInventory(boolean kickedKeepInventory) {
- this.kickedKeepInventory = kickedKeepInventory;
- }
- /**
- * @param kickWait the kickWait to set
- */
- public void setKickWait(long kickWait) {
- this.kickWait = kickWait;
- }
- /**
- * @param leaveConfirmation the leaveConfirmation to set
- */
- public void setLeaveConfirmation(boolean leaveConfirmation) {
- this.leaveConfirmation = leaveConfirmation;
- }
- /**
- * @param leaversLoseReset the leaversLoseReset to set
- */
- public void setLeaversLoseReset(boolean leaversLoseReset) {
- this.leaversLoseReset = leaversLoseReset;
- }
- /**
- * @param leaveWait the leaveWait to set
- */
- public void setLeaveWait(long leaveWait) {
- this.leaveWait = leaveWait;
- }
- /**
- * @param makeIslandIfNone the makeIslandIfNone to set
- */
- public void setMakeIslandIfNone(boolean makeIslandIfNone) {
- this.makeIslandIfNone = makeIslandIfNone;
- }
- /**
- * @param maxHomes the maxHomes to set
- */
- public void setMaxHomes(int maxHomes) {
- this.maxHomes = maxHomes;
- }
- /**
- * @param maxIslands the maxIslands to set
- */
- public void setMaxIslands(int maxIslands) {
- this.maxIslands = maxIslands;
- }
- /**
- * @param maxTeamSize the maxTeamSize to set
- */
- public void setMaxTeamSize(int maxTeamSize) {
- this.maxTeamSize = maxTeamSize;
- }
- /**
- * @param nameMaxLength the nameMaxLength to set
- */
- public void setNameMaxLength(int nameMaxLength) {
- this.nameMaxLength = nameMaxLength;
- }
- /**
- * @param nameMinLength the nameMinLength to set
- */
- public void setNameMinLength(int nameMinLength) {
- this.nameMinLength = nameMinLength;
- }
- /**
- * @param netherGenerate the netherGenerate to set
- */
- public void setNetherGenerate(boolean netherGenerate) {
- this.netherGenerate = netherGenerate;
- }
- /**
- * @param netherIslands the netherIslands to set
- */
- public void setNetherIslands(boolean netherIslands) {
- this.netherIslands = netherIslands;
- }
- /**
- * @param netherRoof the netherRoof to set
- */
- public void setNetherRoof(boolean netherRoof) {
- this.netherRoof = netherRoof;
- }
- /**
- * @param netherSpawnRadius the netherSpawnRadius to set
- */
- public void setNetherSpawnRadius(int netherSpawnRadius) {
- this.netherSpawnRadius = netherSpawnRadius;
- }
- /**
- * @param netherTrees the netherTrees to set
- */
- public void setNetherTrees(boolean netherTrees) {
- this.netherTrees = netherTrees;
- }
- /**
- * @param purgeMaxIslandLevel the purgeMaxIslandLevel to set
- */
- public void setPurgeMaxIslandLevel(int purgeMaxIslandLevel) {
- this.purgeMaxIslandLevel = purgeMaxIslandLevel;
- }
- /**
- * @param purgeRemoveUserData the purgeRemoveUserData to set
- */
- public void setPurgeRemoveUserData(boolean purgeRemoveUserData) {
- this.purgeRemoveUserData = purgeRemoveUserData;
- }
- /**
- * @param resetConfirmation the resetConfirmation to set
- */
- public void setResetConfirmation(boolean resetConfirmation) {
- this.resetConfirmation = resetConfirmation;
- }
- /**
- * @param resetLimit the resetLimit to set
- */
- public void setResetLimit(int resetLimit) {
- this.resetLimit = resetLimit;
- }
- /**
- * @param resetWait the resetWait to set
- */
- public void setResetWait(long resetWait) {
- this.resetWait = resetWait;
- }
- /**
- * @param respawnOnIsland the respawnOnIsland to set
- */
- public void setRespawnOnIsland(boolean respawnOnIsland) {
- this.respawnOnIsland = respawnOnIsland;
- }
- /**
- * @param seaHeight the seaHeight to set
- */
- public void setSeaHeight(int seaHeight) {
- this.seaHeight = seaHeight;
- }
- /**
- * @param tileEntityLimits the tileEntityLimits to set
- */
- public void setTileEntityLimits(Map tileEntityLimits) {
- this.tileEntityLimits = tileEntityLimits;
- }
- /**
- * @param togglePvPCooldown the togglePvPCooldown to set
- */
- public void setTogglePvPCooldown(int togglePvPCooldown) {
- this.togglePvPCooldown = togglePvPCooldown;
- }
- /**
- * @param uniqueId - unique ID the uniqueId to set
- */
- @Override
- public void setUniqueId(String uniqueId) {
- this.uniqueId = uniqueId;
- }
- /**
- * @param useEconomy the useEconomy to set
- */
- public void setUseEconomy(boolean useEconomy) {
- this.useEconomy = useEconomy;
- }
- /**
- * @param useOwnGenerator the useOwnGenerator to set
- */
- public void setUseOwnGenerator(boolean useOwnGenerator) {
- this.useOwnGenerator = useOwnGenerator;
- }
- /**
- * @param worldName the worldName to set
- */
- public void setWorldName(String worldName) {
- this.worldName = worldName;
- }
- /**
- * @return the fakePlayers
- */
- public Set getFakePlayers() {
- return fakePlayers;
- }
- /**
- * @param fakePlayers the fakePlayers to set
- */
- public void setFakePlayers(Set fakePlayers) {
- this.fakePlayers = fakePlayers;
- }
- /**
- * @return the confirmationTime
- */
- public int getConfirmationTime() {
- return confirmationTime;
- }
- /**
- * @param confirmationTime the confirmationTime to set
- */
- public void setConfirmationTime(int confirmationTime) {
- this.confirmationTime = confirmationTime;
- }
-
- /* (non-Javadoc)
- * @see us.tastybento.bskyblock.api.configuration.WorldSettings#getFriendlyName()
- */
- @Override
- public String getFriendlyName() {
- return friendlyName;
- }
-
- /**
- * @param friendlyName the friendlyName to set
- */
- public void setFriendlyName(String friendlyName) {
- this.friendlyName = friendlyName;
- }
- /**
- * @return the dragonSpawn
- */
- @Override
- public boolean isDragonSpawn() {
- return dragonSpawn;
- }
- /**
- * @param dragonSpawn the dragonSpawn to set
- */
- public void setDragonSpawn(boolean dragonSpawn) {
- this.dragonSpawn = dragonSpawn;
- }
-
- @Override
- public String getPermissionPrefix() {
- return "bskyblock";
- }
-
- /**
- * Invincible visitor settings
- * @return the ivSettings
- */
- @Override
- public List getIvSettings() {
- return ivSettings;
- }
-
- /**
- * @param ivSettings the ivSettings to set
- */
- public void setIvSettings(List ivSettings) {
- this.ivSettings = ivSettings;
- }
-
- /**
- * @return the worldFlags
- */
- @Override
- public Map getWorldFlags() {
- return worldFlags;
- }
- /**
- * @param worldFlags the worldFlags to set
- */
- public void setWorldFlags(Map worldFlags) {
- this.worldFlags = worldFlags;
- }
-
- /**
- * @return whether panels should close when clicked outside or not
- */
- public boolean isClosePanelOnClickOutside() {
- return closePanelOnClickOutside;
- }
-
- /**
- * Set panel close on click outside
- * @param closePanelOnClickOutside - true means close panel when click is outside panel
- */
- public void setClosePanelOnClickOutside(boolean closePanelOnClickOutside) {
- this.closePanelOnClickOutside = closePanelOnClickOutside;
- }
- /**
- * @return the defaultGameMode
- */
- @Override
- public GameMode getDefaultGameMode() {
- return defaultGameMode;
- }
- /**
- * @param defaultGameMode the defaultGameMode to set
- */
- public void setDefaultGameMode(GameMode defaultGameMode) {
- this.defaultGameMode = defaultGameMode;
- }
- /**
- * @return the removeMobsWhitelist
- */
- @Override
- public Set getRemoveMobsWhitelist() {
- return removeMobsWhitelist;
- }
- /**
- * @param removeMobsWhitelist the removeMobsWhitelist to set
- */
- public void setRemoveMobsWhitelist(Set removeMobsWhitelist) {
- this.removeMobsWhitelist = removeMobsWhitelist;
- }
- /**
- * @return the onJoinResetMoney
- */
- @Override
- public boolean isOnJoinResetMoney() {
- return onJoinResetMoney;
- }
- /**
- * @return the onJoinResetInventory
- */
- @Override
- public boolean isOnJoinResetInventory() {
- return onJoinResetInventory;
- }
- /**
- * @return the onJoinResetEnderChest
- */
- @Override
- public boolean isOnJoinResetEnderChest() {
- return onJoinResetEnderChest;
- }
- /**
- * @return the onLeaveResetMoney
- */
- @Override
- public boolean isOnLeaveResetMoney() {
- return onLeaveResetMoney;
- }
- /**
- * @return the onLeaveResetInventory
- */
- @Override
- public boolean isOnLeaveResetInventory() {
- return onLeaveResetInventory;
- }
- /**
- * @return the onLeaveResetEnderChest
- */
- @Override
- public boolean isOnLeaveResetEnderChest() {
- return onLeaveResetEnderChest;
- }
- /**
- * @param onJoinResetMoney the onJoinResetMoney to set
- */
- public void setOnJoinResetMoney(boolean onJoinResetMoney) {
- this.onJoinResetMoney = onJoinResetMoney;
- }
- /**
- * @param onJoinResetInventory the onJoinResetInventory to set
- */
- public void setOnJoinResetInventory(boolean onJoinResetInventory) {
- this.onJoinResetInventory = onJoinResetInventory;
- }
- /**
- * @param onJoinResetEnderChest the onJoinResetEnderChest to set
- */
- public void setOnJoinResetEnderChest(boolean onJoinResetEnderChest) {
- this.onJoinResetEnderChest = onJoinResetEnderChest;
- }
- /**
- * @param onLeaveResetMoney the onLeaveResetMoney to set
- */
- public void setOnLeaveResetMoney(boolean onLeaveResetMoney) {
- this.onLeaveResetMoney = onLeaveResetMoney;
- }
- /**
- * @param onLeaveResetInventory the onLeaveResetInventory to set
- */
- public void setOnLeaveResetInventory(boolean onLeaveResetInventory) {
- this.onLeaveResetInventory = onLeaveResetInventory;
- }
- /**
- * @param onLeaveResetEnderChest the onLeaveResetEnderChest to set
- */
- public void setOnLeaveResetEnderChest(boolean onLeaveResetEnderChest) {
- this.onLeaveResetEnderChest = onLeaveResetEnderChest;
- }
-
- @Override
- public Optional getAddon() {
- // This is a plugin, not an addon
- return Optional.empty();
- }
- /**
- * @return the defaultIslandProtection
- */
- @Override
- public Map getDefaultIslandFlags() {
- return defaultIslandFlags;
- }
- /**
- * @return the visibleSettings
- */
- @Override
- public List getVisibleSettings() {
- return visibleSettings;
- }
- /**
- */
- public void setDefaultIslandFlags(Map defaultIslandFlags) {
- this.defaultIslandFlags = defaultIslandFlags;
- }
- /**
- * @param visibleSettings the visibleSettings to set
- */
- public void setVisibleSettings(List visibleSettings) {
- this.visibleSettings = visibleSettings;
- }
- /**
- * @return the defaultIslandSettings
- */
- @Override
- public Map getDefaultIslandSettings() {
- return defaultIslandSettings;
- }
- /**
- * @param defaultIslandSettings the defaultIslandSettings to set
- */
- public void setDefaultIslandSettings(Map defaultIslandSettings) {
- this.defaultIslandSettings = defaultIslandSettings;
- }
-
- public boolean isTeamJoinDeathReset() {
- return teamJoinDeathReset;
- }
- /**
- * @return the visitorbannedcommands
- */
- @Override
- public List getVisitorBannedCommands() {
- return visitorBannedCommands;
- }
- /**
- * @param visitorBannedCommands the visitorbannedcommands to set
- */
- public void setVisitorBannedCommands(List visitorBannedCommands) {
- this.visitorBannedCommands = visitorBannedCommands;
- }
- /**
- * @return the difficulty
- */
- @Override
- public Difficulty getDifficulty() {
- return difficulty;
- }
- /**
- * @param difficulty the difficulty to set
- */
- @Override
- public void setDifficulty(Difficulty difficulty) {
- this.difficulty = difficulty;
- }
-
- @Override
- public boolean isWaterUnsafe() {
- return false;
- }
- /**
- * @return the geoLimitSettings
- */
- @Override
- public List getGeoLimitSettings() {
- return geoLimitSettings;
- }
- /**
- * @param geoLimitSettings the geoLimitSettings to set
- */
- public void setGeoLimitSettings(List geoLimitSettings) {
- this.geoLimitSettings = geoLimitSettings;
- }
- /**
- * @return the resetEpoch
- */
- @Override
- public long getResetEpoch() {
- return resetEpoch;
- }
- /**
- * @param resetEpoch the resetEpoch to set
- */
- @Override
- public void setResetEpoch(long resetEpoch) {
- this.resetEpoch = resetEpoch;
- }
-
-
-}
\ No newline at end of file
diff --git a/src/main/java/us/tastybento/bskyblock/commands/AdminCommand.java b/src/main/java/us/tastybento/bskyblock/commands/AdminCommand.java
deleted file mode 100755
index 456f28e09..000000000
--- a/src/main/java/us/tastybento/bskyblock/commands/AdminCommand.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package us.tastybento.bskyblock.commands;
-
-import java.util.List;
-
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.localization.TextVariables;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.commands.admin.AdminClearResetsAllCommand;
-import us.tastybento.bskyblock.commands.admin.AdminClearResetsCommand;
-import us.tastybento.bskyblock.commands.admin.AdminGetRankCommand;
-import us.tastybento.bskyblock.commands.admin.AdminInfoCommand;
-import us.tastybento.bskyblock.commands.admin.AdminRegisterCommand;
-import us.tastybento.bskyblock.commands.admin.AdminReloadCommand;
-import us.tastybento.bskyblock.commands.admin.AdminSchemCommand;
-import us.tastybento.bskyblock.commands.admin.AdminSetRankCommand;
-import us.tastybento.bskyblock.commands.admin.AdminTeleportCommand;
-import us.tastybento.bskyblock.commands.admin.AdminUnregisterCommand;
-import us.tastybento.bskyblock.commands.admin.AdminVersionCommand;
-import us.tastybento.bskyblock.commands.admin.range.AdminRangeCommand;
-import us.tastybento.bskyblock.commands.admin.team.AdminTeamAddCommand;
-import us.tastybento.bskyblock.commands.admin.team.AdminTeamDisbandCommand;
-import us.tastybento.bskyblock.commands.admin.team.AdminTeamKickCommand;
-import us.tastybento.bskyblock.commands.admin.team.AdminTeamMakeLeaderCommand;
-
-public class AdminCommand extends CompositeCommand {
-
- public AdminCommand() {
- super("bsbadmin", "bsb");
- }
-
- @Override
- public void setup() {
- setPermissionPrefix("bskyblock");
- setPermission("admin.*");
- setOnlyPlayer(false);
- setParameters("commands.admin.help.parameters");
- setDescription("commands.admin.help.description");
- setWorld(getPlugin().getIWM().getBSBIslandWorld());
- new AdminVersionCommand(this);
- new AdminReloadCommand(this);
- new AdminTeleportCommand(this, "tp");
- new AdminTeleportCommand(this, "tpnether");
- new AdminTeleportCommand(this, "tpend");
- new AdminGetRankCommand(this);
- new AdminSetRankCommand(this);
- new AdminInfoCommand(this);
- // Team commands
- new AdminTeamAddCommand(this);
- new AdminTeamKickCommand(this);
- new AdminTeamDisbandCommand(this);
- new AdminTeamMakeLeaderCommand(this);
- // Schems
- new AdminSchemCommand(this);
- // Register/unregister islands
- new AdminRegisterCommand(this);
- new AdminUnregisterCommand(this);
- // Range
- new AdminRangeCommand(this);
- // Resets
- new AdminClearResetsCommand(this);
- new AdminClearResetsAllCommand(this);
- }
-
- @Override
- public boolean execute(User user, String label, List args) {
- if (!args.isEmpty()) {
- user.sendMessage("general.errors.unknown-command", TextVariables.LABEL, getTopLabel());
- return false;
- }
- // By default run the attached help command, if it exists (it should)
- return showHelp(this, user);
- }
-
-}
diff --git a/src/main/java/us/tastybento/bskyblock/commands/IslandCommand.java b/src/main/java/us/tastybento/bskyblock/commands/IslandCommand.java
deleted file mode 100755
index d7cfac96f..000000000
--- a/src/main/java/us/tastybento/bskyblock/commands/IslandCommand.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package us.tastybento.bskyblock.commands;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.localization.TextVariables;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.commands.island.IslandAboutCommand;
-import us.tastybento.bskyblock.commands.island.IslandBanCommand;
-import us.tastybento.bskyblock.commands.island.IslandBanlistCommand;
-import us.tastybento.bskyblock.commands.island.IslandCreateCommand;
-import us.tastybento.bskyblock.commands.island.IslandGoCommand;
-import us.tastybento.bskyblock.commands.island.IslandLanguageCommand;
-import us.tastybento.bskyblock.commands.island.IslandResetCommand;
-import us.tastybento.bskyblock.commands.island.IslandResetnameCommand;
-import us.tastybento.bskyblock.commands.island.IslandSethomeCommand;
-import us.tastybento.bskyblock.commands.island.IslandSetnameCommand;
-import us.tastybento.bskyblock.commands.island.IslandSettingsCommand;
-import us.tastybento.bskyblock.commands.island.IslandUnbanCommand;
-import us.tastybento.bskyblock.commands.island.team.IslandTeamCommand;
-
-public class IslandCommand extends CompositeCommand {
-
- public IslandCommand() {
- super("island", "is");
- }
-
- /* (non-Javadoc)
- * @see us.tastybento.bskyblock.api.commands.CompositeCommand#setup()
- */
- @Override
- public void setup() {
- setDescription("commands.island.help.description");
- setOnlyPlayer(true);
- // Permission
- setPermissionPrefix("bskyblock");
- setPermission("island");
- setWorld(getPlugin().getIWM().getBSBIslandWorld());
- // Set up subcommands
- new IslandAboutCommand(this);
- new IslandCreateCommand(this);
- new IslandGoCommand(this);
- new IslandResetCommand(this);
- new IslandSetnameCommand(this);
- new IslandResetnameCommand(this);
- new IslandSethomeCommand(this);
- new IslandSettingsCommand(this);
- new IslandLanguageCommand(this);
- new IslandBanCommand(this);
- new IslandUnbanCommand(this);
- new IslandBanlistCommand(this);
- // Team commands
- new IslandTeamCommand(this);
- }
-
- /* (non-Javadoc)
- * @see us.tastybento.bskyblock.api.commands.CommandArgument#execute(org.bukkit.command.CommandSender, java.lang.String[])
- */
- @Override
- public boolean execute(User user, String label, List args) {
- if (user == null) {
- return false;
- }
- if (args.isEmpty()) {
- // If user has an island, go
- if (getPlugin().getIslands().getIsland(getWorld(), user.getUniqueId()) != null) {
- return getSubCommand("go").map(goCmd -> goCmd.execute(user, goCmd.getLabel(), new ArrayList<>())).orElse(false);
- }
- // No islands currently
- return getSubCommand("create").map(createCmd -> createCmd.execute(user, createCmd.getLabel(), new ArrayList<>())).orElse(false);
- }
- user.sendMessage("general.errors.unknown-command", TextVariables.LABEL, getTopLabel());
- return false;
-
- }
-
-}
diff --git a/src/main/java/us/tastybento/bskyblock/commands/island/IslandInfoCommand.java b/src/main/java/us/tastybento/bskyblock/commands/island/IslandInfoCommand.java
deleted file mode 100644
index 7c5ed939e..000000000
--- a/src/main/java/us/tastybento/bskyblock/commands/island/IslandInfoCommand.java
+++ /dev/null
@@ -1,4 +0,0 @@
-package us.tastybento.bskyblock.commands.island;
-
-public class IslandInfoCommand {
-}
diff --git a/src/main/java/us/tastybento/bskyblock/commands/island/IslandSpawnCommand.java b/src/main/java/us/tastybento/bskyblock/commands/island/IslandSpawnCommand.java
deleted file mode 100644
index f5fa1d3a7..000000000
--- a/src/main/java/us/tastybento/bskyblock/commands/island/IslandSpawnCommand.java
+++ /dev/null
@@ -1,4 +0,0 @@
-package us.tastybento.bskyblock.commands.island;
-
-public class IslandSpawnCommand {
-}
diff --git a/src/main/java/us/tastybento/bskyblock/database/flatfile/FlatFileDatabase.java b/src/main/java/us/tastybento/bskyblock/database/flatfile/FlatFileDatabase.java
deleted file mode 100755
index 86bfba544..000000000
--- a/src/main/java/us/tastybento/bskyblock/database/flatfile/FlatFileDatabase.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package us.tastybento.bskyblock.database.flatfile;
-
-import us.tastybento.bskyblock.BSkyBlock;
-import us.tastybento.bskyblock.database.AbstractDatabaseHandler;
-import us.tastybento.bskyblock.database.BSBDbSetup;
-
-public class FlatFileDatabase extends BSBDbSetup{
-
- @Override
- public AbstractDatabaseHandler> getHandler(Class> type) {
- return new FlatFileDatabaseHandler<>(BSkyBlock.getInstance(), type, new FlatFileDatabaseConnecter(BSkyBlock.getInstance()));
- }
-
- /**
- * Get the config
- * @param type - config object type
- * @return - the config handler
- */
- public AbstractDatabaseHandler> getConfig(Class> type) {
- return new ConfigHandler<>(BSkyBlock.getInstance(), type, new FlatFileDatabaseConnecter(BSkyBlock.getInstance()));
- }
-
-}
diff --git a/src/main/java/us/tastybento/bskyblock/generators/ChunkGeneratorWorld.java b/src/main/java/us/tastybento/bskyblock/generators/ChunkGeneratorWorld.java
deleted file mode 100644
index d4661a356..000000000
--- a/src/main/java/us/tastybento/bskyblock/generators/ChunkGeneratorWorld.java
+++ /dev/null
@@ -1,143 +0,0 @@
-package us.tastybento.bskyblock.generators;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.Random;
-
-import org.bukkit.Material;
-import org.bukkit.World;
-import org.bukkit.World.Environment;
-import org.bukkit.generator.BlockPopulator;
-import org.bukkit.generator.ChunkGenerator;
-import org.bukkit.util.noise.PerlinOctaveGenerator;
-
-import us.tastybento.bskyblock.BSkyBlock;
-
-/**
- * @author tastybento
- * Creates the world
- */
-public class ChunkGeneratorWorld extends ChunkGenerator {
-
- BSkyBlock plugin;
- Random rand = new Random();
- PerlinOctaveGenerator gen;
-
- /**
- * @param plugin - BSkyBlock plugin object
- */
- public ChunkGeneratorWorld(BSkyBlock plugin) {
- super();
- this.plugin = plugin;
- }
-
- @Override
- public ChunkData generateChunkData(World world, Random random, int chunkX, int chunkZ, ChunkGenerator.BiomeGrid biomeGrid) {
- if (world.getEnvironment().equals(World.Environment.NETHER)) {
- return generateNetherChunks(world, random, chunkX, chunkZ, biomeGrid);
- }
- ChunkData result = createChunkData(world);
- if (plugin.getSettings().getSeaHeight() != 0) {
- for (int x = 0; x < 16; x++) {
- for (int z = 0; z < 16; z++) {
- for (int y = 0; y < plugin.getSettings().getSeaHeight(); y++) {
- result.setBlock(x, y, z, Material.STATIONARY_WATER);
- }
- }
- }
-
- }
- return result;
- }
-
- // This needs to be set to return true to override minecraft's default
- // behavior
- @Override
- public boolean canSpawn(World world, int x, int z) {
- return true;
- }
-
- @Override
- public List getDefaultPopulators(final World world) {
- return Arrays.asList(new BlockPopulator[0]);
- }
-
- /*
- * Nether Section
- */
- private ChunkData generateNetherChunks(World world, Random random, int chunkX, int chunkZ, BiomeGrid biomeGrid) {
- ChunkData result = createChunkData(world);
- rand.setSeed(world.getSeed());
- gen = new PerlinOctaveGenerator((long) (random.nextLong() * random.nextGaussian()), 8);
- // This is a nether generator
- if (!world.getEnvironment().equals(Environment.NETHER)) {
- return result;
- }
- if (plugin.getSettings().isNetherRoof()) {
- // Make the roof - common across the world
- for (int x = 0; x < 16; x++) {
- for (int z = 0; z < 16; z++) {
- // Do the ceiling
- int maxHeight = world.getMaxHeight();
- result.setBlock(x, (maxHeight - 1), z, Material.BEDROCK);
- // Next three layers are a mix of bedrock and netherrack
- for (int y = 2; y < 5; y++) {
- double r = gen.noise(x, (maxHeight - y), z, 0.5, 0.5);
- if (r > 0D) {
- result.setBlock(x, (maxHeight - y), z, Material.BEDROCK);
- }
- }
- // Next three layers are a mix of netherrack and air
- for (int y = 5; y < 8; y++) {
- double r = gen.noise(x, (double)maxHeight - y, z, 0.5, 0.5);
- if (r > 0D) {
- result.setBlock(x, (maxHeight - y), z, Material.NETHERRACK);
- } else {
- result.setBlock(x, (maxHeight - y), z, Material.AIR);
- }
- }
- // Layer 8 may be glowstone
- double r = gen.noise(x, (double)maxHeight - 8, z, random.nextFloat(), random.nextFloat());
- if (r > 0.5D) {
- // Have blobs of glowstone
- switch (random.nextInt(4)) {
- case 1:
- // Single block
- result.setBlock(x, (maxHeight - 8), z, Material.GLOWSTONE);
- if (x < 14 && z < 14) {
- result.setBlock(x + 1, (maxHeight - 8), z + 1, Material.GLOWSTONE);
- result.setBlock(x + 2, (maxHeight - 8), z + 2, Material.GLOWSTONE);
- result.setBlock(x + 1, (maxHeight - 8), z + 2, Material.GLOWSTONE);
- result.setBlock(x + 1, (maxHeight - 8), z + 2, Material.GLOWSTONE);
- }
- break;
- case 2:
- // Stalatite
- for (int i = 0; i < random.nextInt(10); i++) {
- result.setBlock(x, (maxHeight - 8 - i), z, Material.GLOWSTONE);
- }
- break;
- case 3:
- result.setBlock(x, (maxHeight - 8), z, Material.GLOWSTONE);
- if (x > 3 && z > 3) {
- for (int xx = 0; xx < 3; xx++) {
- for (int zz = 0; zz < 3; zz++) {
- result.setBlock(x - xx, (maxHeight - 8 - random.nextInt(2)), z - xx, Material.GLOWSTONE);
- }
- }
- }
- break;
- default:
- result.setBlock(x, (maxHeight - 8), z, Material.GLOWSTONE);
- }
- result.setBlock(x, (maxHeight - 8), z, Material.GLOWSTONE);
- } else {
- result.setBlock(x, (maxHeight - 8), z, Material.AIR);
- }
- }
- }
- }
- return result;
-
- }
-}
\ No newline at end of file
diff --git a/src/main/java/us/tastybento/bskyblock/generators/NetherPopulator.java b/src/main/java/us/tastybento/bskyblock/generators/NetherPopulator.java
deleted file mode 100644
index ded89fced..000000000
--- a/src/main/java/us/tastybento/bskyblock/generators/NetherPopulator.java
+++ /dev/null
@@ -1,122 +0,0 @@
-package us.tastybento.bskyblock.generators;
-
-import java.util.Random;
-
-import org.bukkit.Chunk;
-import org.bukkit.Material;
-import org.bukkit.TreeType;
-import org.bukkit.World;
-import org.bukkit.block.Block;
-import org.bukkit.block.BlockFace;
-import org.bukkit.block.Chest;
-import org.bukkit.block.CreatureSpawner;
-import org.bukkit.entity.EntityType;
-import org.bukkit.generator.BlockPopulator;
-import org.bukkit.inventory.Inventory;
-import org.bukkit.inventory.ItemStack;
-
-/**
- * @author tastybento
- * Populates the Nether with appropriate blocks
- *
- */
-public class NetherPopulator extends BlockPopulator {
-
- @Override
- public void populate(World world, Random random, Chunk source) {
- // Rough check - convert spawners to Nether spawners
- for (int x = 0; x < 16; x++) {
- for (int y = 0; y < world.getMaxHeight(); y++) {
- for (int z = 0; z < 16; z++) {
- Block b = source.getBlock(x, y, z);
- if (b.getType().equals(Material.MOB_SPAWNER)) {
- CreatureSpawner cs = (CreatureSpawner) b.getState();
- switch (random.nextInt(3)) {
- case 0:
- cs.setSpawnedType(EntityType.BLAZE);
- break;
- case 1:
- cs.setSpawnedType(EntityType.SKELETON);
- break;
- case 2:
- cs.setSpawnedType(EntityType.MAGMA_CUBE);
- break;
- default:
- cs.setSpawnedType(EntityType.BLAZE);
- }
- } else if (b.getType().equals(Material.OBSIDIAN)) {
- b.setType(Material.CHEST);
- Chest cs = (Chest) b.getState();
- Inventory chestInv = cs.getInventory();
- // Fill it with random goodies
- /*
- * 2 to 5 stacks of any of the following
- * Diamonds 1 - 3 6.85% (5/73)
- * Iron Ingots 1 - 5 6.85% (5/73)
- * Gold Ingots 1 - 3 20.5% (15/73)
- * Golden Sword 1 6.85% (5/73)
- * Golden Chestplate 1 6.85% (5/73)
- * Flint and Steel 1 6.85% (5/73)
- * Nether Wart 3 - 7 6.85% (5/73)
- * Saddle 1 13.7% (10/73)
- * Golden Horse Armor 1 11.0% (8/73)
- * Iron Horse Armor 1 6.85% (5/73)
- * Diamond Horse Armor 1 4.11% (3/73)
- * Obsidian 2 - 4 2.74% (2/73)
- */
- // Pick how many stacks
- int numOfStacks = 2 + random.nextInt(3);
- // Pick the stacks
- for (int i = 0; i < numOfStacks; i++) {
- // Pick a random inventory slot
- int slot = random.nextInt(chestInv.getSize());
- // Try a few times to find an empty slot (avoids an
- // infinite loop potential)
- for (int j = 0; j < chestInv.getSize(); j++) {
- if (chestInv.getItem(slot) == null) {
- break;
- }
- slot = random.nextInt(chestInv.getSize());
- }
- int choice = random.nextInt(73);
- if (choice < 5) {
- chestInv.setItem(slot, new ItemStack(Material.DIAMOND, random.nextInt(2) + 1));
- } else if (choice < 10) {
- chestInv.setItem(slot, new ItemStack(Material.IRON_INGOT, random.nextInt(4) + 1));
- } else if (choice < 25) {
- chestInv.setItem(slot, new ItemStack(Material.GOLD_INGOT, random.nextInt(2) + 1));
- } else if (choice < 30) {
- chestInv.setItem(slot, new ItemStack(Material.GOLD_SWORD, 1));
- } else if (choice < 35) {
- chestInv.setItem(slot, new ItemStack(Material.GOLD_CHESTPLATE, 1));
- } else if (choice < 40) {
- chestInv.setItem(slot, new ItemStack(Material.FLINT_AND_STEEL, 1));
- } else if (choice < 45) {
- chestInv.setItem(slot, new ItemStack(Material.NETHER_STALK, random.nextInt(4) + 3));
- } else if (choice < 55) {
- chestInv.setItem(slot, new ItemStack(Material.SADDLE, 1));
- } else if (choice < 63) {
- chestInv.setItem(slot, new ItemStack(Material.GOLD_BARDING, 1));
- } else if (choice < 68) {
- chestInv.setItem(slot, new ItemStack(Material.IRON_BARDING, 1));
- } else if (choice < 71) {
- chestInv.setItem(slot, new ItemStack(Material.DIAMOND_BARDING, 1));
- } else {
- chestInv.setItem(slot, new ItemStack(Material.OBSIDIAN, random.nextInt(3) + 1));
- }
- }
-
- } else if (b.getType().equals(Material.STONE)) {
- b.setType(Material.QUARTZ_ORE);
- } else if (b.getType().equals(Material.DIRT)) {
- world.generateTree(source.getBlock(x, y + 1, z).getLocation(), TreeType.BROWN_MUSHROOM);
- b.setType(Material.SOUL_SAND);
- } else if (b.getType().equals(Material.SOUL_SAND) && b.getRelative(BlockFace.UP).getType().equals(Material.AIR)
- && random.nextInt(9) == 1) {
- b.getRelative(BlockFace.UP).setType(Material.NETHER_WARTS);
- }
- }
- }
- }
- }
-}
diff --git a/src/main/java/us/tastybento/bskyblock/BSkyBlock.java b/src/main/java/world/bentobox/bbox/BentoBox.java
similarity index 82%
rename from src/main/java/us/tastybento/bskyblock/BSkyBlock.java
rename to src/main/java/world/bentobox/bbox/BentoBox.java
index efa163b1e..9aa8afb75 100755
--- a/src/main/java/us/tastybento/bskyblock/BSkyBlock.java
+++ b/src/main/java/world/bentobox/bbox/BentoBox.java
@@ -1,44 +1,42 @@
-package us.tastybento.bskyblock;
+package world.bentobox.bbox;
import org.bukkit.Bukkit;
import org.bukkit.World;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
-import us.tastybento.bskyblock.api.configuration.BSBConfig;
-import us.tastybento.bskyblock.api.configuration.WorldSettings;
-import us.tastybento.bskyblock.api.events.BSBReadyEvent;
-import us.tastybento.bskyblock.api.placeholders.PlaceholderHandler;
-import us.tastybento.bskyblock.api.user.Notifier;
-import us.tastybento.bskyblock.commands.AdminCommand;
-import us.tastybento.bskyblock.commands.IslandCommand;
-import us.tastybento.bskyblock.database.BSBDbSetup;
-import us.tastybento.bskyblock.listeners.BannedVisitorCommands;
-import us.tastybento.bskyblock.listeners.BlockEndDragon;
-import us.tastybento.bskyblock.listeners.JoinLeaveListener;
-import us.tastybento.bskyblock.listeners.NetherPortals;
-import us.tastybento.bskyblock.listeners.ObsidianToLava;
-import us.tastybento.bskyblock.listeners.PanelListenerManager;
-import us.tastybento.bskyblock.listeners.protection.FlyingMobEvents;
-import us.tastybento.bskyblock.managers.AddonsManager;
-import us.tastybento.bskyblock.managers.CommandsManager;
-import us.tastybento.bskyblock.managers.FlagsManager;
-import us.tastybento.bskyblock.managers.IslandWorldManager;
-import us.tastybento.bskyblock.managers.IslandsManager;
-import us.tastybento.bskyblock.managers.LocalesManager;
-import us.tastybento.bskyblock.managers.PlayersManager;
-import us.tastybento.bskyblock.managers.RanksManager;
-import us.tastybento.bskyblock.managers.SchemsManager;
-import us.tastybento.bskyblock.util.HeadGetter;
+import world.bentobox.bbox.api.configuration.BSBConfig;
+import world.bentobox.bbox.api.configuration.WorldSettings;
+import world.bentobox.bbox.api.events.BentoBoxReadyEvent;
+import world.bentobox.bbox.api.placeholders.PlaceholderHandler;
+import world.bentobox.bbox.api.user.Notifier;
+import world.bentobox.bbox.database.BSBDbSetup;
+import world.bentobox.bbox.listeners.BannedVisitorCommands;
+import world.bentobox.bbox.listeners.BlockEndDragon;
+import world.bentobox.bbox.listeners.JoinLeaveListener;
+import world.bentobox.bbox.listeners.NetherPortals;
+import world.bentobox.bbox.listeners.ObsidianToLava;
+import world.bentobox.bbox.listeners.PanelListenerManager;
+import world.bentobox.bbox.listeners.protection.FlyingMobEvents;
+import world.bentobox.bbox.managers.AddonsManager;
+import world.bentobox.bbox.managers.CommandsManager;
+import world.bentobox.bbox.managers.FlagsManager;
+import world.bentobox.bbox.managers.IslandWorldManager;
+import world.bentobox.bbox.managers.IslandsManager;
+import world.bentobox.bbox.managers.LocalesManager;
+import world.bentobox.bbox.managers.PlayersManager;
+import world.bentobox.bbox.managers.RanksManager;
+import world.bentobox.bbox.managers.SchemsManager;
+import world.bentobox.bbox.util.HeadGetter;
/**
- * Main BSkyBlock class - provides an island minigame in the sky
+ * Main BentoBox class
* @author tastybento
* @author Poslovitch
*/
-public class BSkyBlock extends JavaPlugin {
+public class BentoBox extends JavaPlugin {
- private static BSkyBlock instance;
+ private static BentoBox instance;
// Databases
private PlayersManager playersManager;
@@ -112,12 +110,6 @@ public class BSkyBlock extends JavaPlugin {
islandWorldManager = new IslandWorldManager(instance);
// Load schems manager
schemsManager = new SchemsManager(instance);
- // Load the default island schems
- schemsManager.loadIslands(getIWM().getBSBIslandWorld());
-
- // Set up commands
- new IslandCommand();
- new AdminCommand();
// Locales manager must be loaded before addons
localesManager = new LocalesManager(instance);
@@ -151,7 +143,7 @@ public class BSkyBlock extends JavaPlugin {
instance.log("#############################################");
// Fire plugin ready event
- Bukkit.getServer().getPluginManager().callEvent(new BSBReadyEvent());
+ Bukkit.getServer().getPluginManager().callEvent(new BentoBoxReadyEvent());
});
});
}
@@ -247,11 +239,11 @@ public class BSkyBlock extends JavaPlugin {
return islandsManager;
}
- private static void setInstance(BSkyBlock plugin) {
- BSkyBlock.instance = plugin;
+ private static void setInstance(BentoBox plugin) {
+ BentoBox.instance = plugin;
}
- public static BSkyBlock getInstance() {
+ public static BentoBox getInstance() {
return instance;
}
diff --git a/src/main/java/us/tastybento/bskyblock/Constants.java b/src/main/java/world/bentobox/bbox/Constants.java
similarity index 92%
rename from src/main/java/us/tastybento/bskyblock/Constants.java
rename to src/main/java/world/bentobox/bbox/Constants.java
index 1223358c8..76a04be0b 100644
--- a/src/main/java/us/tastybento/bskyblock/Constants.java
+++ b/src/main/java/world/bentobox/bbox/Constants.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock;
+package world.bentobox.bbox;
/**
* Contains the plugin constants.
diff --git a/src/main/java/us/tastybento/bskyblock/Metrics.java b/src/main/java/world/bentobox/bbox/Metrics.java
similarity index 99%
rename from src/main/java/us/tastybento/bskyblock/Metrics.java
rename to src/main/java/world/bentobox/bbox/Metrics.java
index 53ad3d90d..b21e8a0a2 100755
--- a/src/main/java/us/tastybento/bskyblock/Metrics.java
+++ b/src/main/java/world/bentobox/bbox/Metrics.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock;
+package world.bentobox.bbox;
import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
diff --git a/src/main/java/world/bentobox/bbox/Settings.java b/src/main/java/world/bentobox/bbox/Settings.java
new file mode 100644
index 000000000..f88623221
--- /dev/null
+++ b/src/main/java/world/bentobox/bbox/Settings.java
@@ -0,0 +1,614 @@
+package world.bentobox.bbox;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import world.bentobox.bbox.api.configuration.ConfigComment;
+import world.bentobox.bbox.api.configuration.ConfigEntry;
+import world.bentobox.bbox.api.configuration.StoreAt;
+import world.bentobox.bbox.database.BSBDbSetup.DatabaseType;
+import world.bentobox.bbox.database.objects.DataObject;
+
+/**
+ * All the plugin settings are here
+ * @author Tastybento
+ */
+@StoreAt(filename="config.yml") // Explicitly call out what name this should have.
+@ConfigComment("BentoBox Configuration [version]")
+@ConfigComment("This config file is dynamic and saved when the server is shutdown.")
+@ConfigComment("You cannot edit it while the server is running because changes will")
+@ConfigComment("be lost! Use in-game settings GUI or edit when server is offline.")
+@ConfigComment("")
+public class Settings implements DataObject {
+
+ // ---------------------------------------------
+
+ /* GENERAL */
+ @ConfigComment("BentoBox uses bStats.org to get global data about the plugin to help improving it.")
+ @ConfigComment("bStats has nearly no effect on your server's performance and the sent data is completely")
+ @ConfigComment("anonymous so please consider twice if you really want to disable it.")
+ @ConfigEntry(path = "general.metrics")
+ private boolean metrics = true;
+
+ @ConfigComment("Check for updates - this will tell Ops and the console if there is a new")
+ @ConfigComment("version available. It contacts dev.bukkit.org to request the latest version")
+ @ConfigComment("info. It does not download the latest version or change any files")
+ @ConfigEntry(path = "general.check-updates")
+ private boolean checkUpdates = true;
+
+ @ConfigComment("Default language for new players.")
+ @ConfigComment("This is the filename in the locale folder without .yml.")
+ @ConfigComment("If this does not exist, the default en-US will be used.")
+ @ConfigEntry(path = "general.default-language")
+ private String defaultLanguage = "en-US";
+
+ @ConfigComment("Use economy or not. If true, an economy plugin is required. If false, no money is used or give.")
+ @ConfigComment("If there is no economy plugin present anyway, money will be automatically disabled.")
+ @ConfigEntry(path = "general.use-economy")
+ private boolean useEconomy = true;
+
+ @ConfigComment("Starting money - this is how much money new players will have as their")
+ @ConfigComment("balance at the start of an island.")
+ @ConfigEntry(path = "general.starting-money")
+ private double startingMoney = 10.0;
+
+ // Purge
+ @ConfigComment("Only islands below this level will be removed if they are abandoned and admins issue the purge command")
+ @ConfigEntry(path = "general.purge.max-island-level")
+ private int purgeMaxIslandLevel = 50;
+
+ @ConfigComment("Remove user data when its island gets purged.")
+ @ConfigComment("Helps a lot to avoid huge backups and can save some performance on startup,")
+ @ConfigComment("but the player settings and data will be reset.")
+ @ConfigEntry(path = "general.purge.remove-user-data")
+ private boolean purgeRemoveUserData = false;
+
+ // Database
+ @ConfigComment("FLATFILE, MYSQL, MONGO")
+ @ConfigComment("if you use MONGO, you must also run the BSBMongo plugin (not addon)")
+ @ConfigComment("See https://github.com/tastybento/bsbMongo/releases/")
+ @ConfigEntry(path = "general.database.type")
+ private DatabaseType databaseType = DatabaseType.FLATFILE;
+
+ @ConfigEntry(path = "general.database.host")
+ private String dbHost = "localhost";
+
+ @ConfigComment("Port 3306 is MySQL's default. Port 27017 is MongoDB's default.")
+ @ConfigEntry(path = "general.database.port")
+ private int dbPort = 3306;
+
+ @ConfigEntry(path = "general.database.name")
+ private String dbName = "bentobox";
+
+ @ConfigEntry(path = "general.database.username")
+ private String dbUsername = "username";
+
+ @ConfigEntry(path = "general.database.password")
+ private String dbPassword = "password";
+
+ @ConfigComment("How often the data will be saved to file in mins. Default is 5 minutes.")
+ @ConfigComment("This helps prevent issues if the server crashes.")
+ @ConfigComment("Data is also saved at important points in the game.")
+ @ConfigEntry(path = "general.database.backup-period")
+ private int databaseBackupPeriod = 5;
+
+ @ConfigComment("Recover super flat - if the generator does not run for some reason, you can get")
+ @ConfigComment("super flat chunks (grass). To remove automatically, select this option. Turn off")
+ @ConfigComment("if there are no more because it may cause lag.")
+ @ConfigComment("This will regenerate any chunks with bedrock at y=0 when they are loaded")
+ @ConfigEntry(path = "general.recover-super-flat")
+ private boolean recoverSuperFlat = false;
+
+ @ConfigComment("Mute death messages")
+ @ConfigEntry(path = "general.mute-death-messages")
+ private boolean muteDeathMessages = false;
+
+ @ConfigComment("Allow FTB Autonomous Activator to work (will allow a pseudo player [CoFH] to place and break blocks and hang items)")
+ @ConfigComment("Add other fake player names here if required")
+ @ConfigEntry(path = "general.fakeplayers")
+ private Set fakePlayers = new HashSet<>();
+
+ @ConfigComment("Allow obsidian to be scooped up with an empty bucket back into lava")
+ @ConfigComment("This only works if there is a single block of obsidian (no obsidian within 10 blocks)")
+ @ConfigComment("Recommendation is to keep this true so that newbies don't bother you or reset their")
+ @ConfigComment("island unnecessarily.")
+ @ConfigEntry(path = "general.allow-obsidian-scooping")
+ private boolean allowObsidianScooping = true;
+
+ @ConfigComment("Time in seconds that players have to confirm sensitive commands, e.g. island reset")
+ @ConfigEntry(path = "general.confirmation-time")
+ private int confirmationTime = 20;
+
+ @ConfigEntry(path = "panel.close-on-click-outside")
+ private boolean closePanelOnClickOutside = true;
+
+ /*
+ * Island
+ */
+ // Invites
+ @ConfigComment("How long a player must wait until they can rejoin a team island after being")
+ @ConfigComment("kicked in minutes. This slows the effectiveness of players repeating challenges")
+ @ConfigComment("by repetitively being invited to a team island.")
+ @ConfigEntry(path = "island.invite-wait")
+ private int inviteWait = 60;
+
+ // Timeout for team kick and leave commands
+ @ConfigComment("Ask the player to confirm the command he is using by typing it again.")
+ @ConfigComment("The 'wait' value is the number of seconds to wait for confirmation.")
+ @ConfigEntry(path = "island.require-confirmation.kick")
+ private boolean kickConfirmation = true;
+
+ @ConfigEntry(path = "island.require-confirmation.kick-wait")
+ private long kickWait = 10L;
+
+ @ConfigEntry(path = "island.require-confirmation.leave")
+ private boolean leaveConfirmation = true;
+
+ @ConfigEntry(path = "island.require-confirmation.leave-wait")
+ private long leaveWait = 10L;
+
+ @ConfigEntry(path = "island.require-confirmation.reset")
+ private boolean resetConfirmation = true;
+
+ @ConfigComment("How long a player must wait before they can reset their island again in seconds")
+ @ConfigEntry(path = "island.reset-wait")
+ private long resetWait = 300;
+
+ @ConfigComment("These set the minimum and maximum size of a name.")
+ @ConfigEntry(path = "island.name.min-length")
+ private int nameMinLength = 4;
+ @ConfigEntry(path = "island.name.max-length")
+ private int nameMaxLength = 20;
+
+
+ // Ranks
+ @ConfigEntry(path = "island.customranks")
+ private Map customRanks = new HashMap<>();
+
+
+ //---------------------------------------------------------------------------------------/
+ @ConfigComment("These settings should not be edited")
+ private String uniqueId = "config";
+
+ /**
+ * @return the metrics
+ */
+ public boolean isMetrics() {
+ return metrics;
+ }
+
+ /**
+ * @return the checkUpdates
+ */
+ public boolean isCheckUpdates() {
+ return checkUpdates;
+ }
+
+ /**
+ * @return the defaultLanguage
+ */
+ public String getDefaultLanguage() {
+ return defaultLanguage;
+ }
+
+ /**
+ * @return the useEconomy
+ */
+ public boolean isUseEconomy() {
+ return useEconomy;
+ }
+
+ /**
+ * @return the startingMoney
+ */
+ public double getStartingMoney() {
+ return startingMoney;
+ }
+
+ /**
+ * @return the purgeMaxIslandLevel
+ */
+ public int getPurgeMaxIslandLevel() {
+ return purgeMaxIslandLevel;
+ }
+
+ /**
+ * @return the purgeRemoveUserData
+ */
+ public boolean isPurgeRemoveUserData() {
+ return purgeRemoveUserData;
+ }
+
+ /**
+ * @return the databaseType
+ */
+ public DatabaseType getDatabaseType() {
+ return databaseType;
+ }
+
+ /**
+ * @return the dbHost
+ */
+ public String getDbHost() {
+ return dbHost;
+ }
+
+ /**
+ * @return the dbPort
+ */
+ public int getDbPort() {
+ return dbPort;
+ }
+
+ /**
+ * @return the dbName
+ */
+ public String getDbName() {
+ return dbName;
+ }
+
+ /**
+ * @return the dbUsername
+ */
+ public String getDbUsername() {
+ return dbUsername;
+ }
+
+ /**
+ * @return the dbPassword
+ */
+ public String getDbPassword() {
+ return dbPassword;
+ }
+
+ /**
+ * @return the databaseBackupPeriod
+ */
+ public int getDatabaseBackupPeriod() {
+ return databaseBackupPeriod;
+ }
+
+ /**
+ * @return the recoverSuperFlat
+ */
+ public boolean isRecoverSuperFlat() {
+ return recoverSuperFlat;
+ }
+
+ /**
+ * @return the muteDeathMessages
+ */
+ public boolean isMuteDeathMessages() {
+ return muteDeathMessages;
+ }
+
+ /**
+ * @return the fakePlayers
+ */
+ public Set getFakePlayers() {
+ return fakePlayers;
+ }
+
+ /**
+ * @return the allowObsidianScooping
+ */
+ public boolean isAllowObsidianScooping() {
+ return allowObsidianScooping;
+ }
+
+ /**
+ * @return the confirmationTime
+ */
+ public int getConfirmationTime() {
+ return confirmationTime;
+ }
+
+ /**
+ * @return the closePanelOnClickOutside
+ */
+ public boolean isClosePanelOnClickOutside() {
+ return closePanelOnClickOutside;
+ }
+
+ /**
+ * @return the uniqueId
+ */
+ @Override
+ public String getUniqueId() {
+ return uniqueId;
+ }
+
+ /**
+ * @param metrics the metrics to set
+ */
+ public void setMetrics(boolean metrics) {
+ this.metrics = metrics;
+ }
+
+ /**
+ * @param checkUpdates the checkUpdates to set
+ */
+ public void setCheckUpdates(boolean checkUpdates) {
+ this.checkUpdates = checkUpdates;
+ }
+
+ /**
+ * @param defaultLanguage the defaultLanguage to set
+ */
+ public void setDefaultLanguage(String defaultLanguage) {
+ this.defaultLanguage = defaultLanguage;
+ }
+
+ /**
+ * @param useEconomy the useEconomy to set
+ */
+ public void setUseEconomy(boolean useEconomy) {
+ this.useEconomy = useEconomy;
+ }
+
+ /**
+ * @param startingMoney the startingMoney to set
+ */
+ public void setStartingMoney(double startingMoney) {
+ this.startingMoney = startingMoney;
+ }
+
+ /**
+ * @param purgeMaxIslandLevel the purgeMaxIslandLevel to set
+ */
+ public void setPurgeMaxIslandLevel(int purgeMaxIslandLevel) {
+ this.purgeMaxIslandLevel = purgeMaxIslandLevel;
+ }
+
+ /**
+ * @param purgeRemoveUserData the purgeRemoveUserData to set
+ */
+ public void setPurgeRemoveUserData(boolean purgeRemoveUserData) {
+ this.purgeRemoveUserData = purgeRemoveUserData;
+ }
+
+ /**
+ * @param databaseType the databaseType to set
+ */
+ public void setDatabaseType(DatabaseType databaseType) {
+ this.databaseType = databaseType;
+ }
+
+ /**
+ * @param dbHost the dbHost to set
+ */
+ public void setDbHost(String dbHost) {
+ this.dbHost = dbHost;
+ }
+
+ /**
+ * @param dbPort the dbPort to set
+ */
+ public void setDbPort(int dbPort) {
+ this.dbPort = dbPort;
+ }
+
+ /**
+ * @param dbName the dbName to set
+ */
+ public void setDbName(String dbName) {
+ this.dbName = dbName;
+ }
+
+ /**
+ * @param dbUsername the dbUsername to set
+ */
+ public void setDbUsername(String dbUsername) {
+ this.dbUsername = dbUsername;
+ }
+
+ /**
+ * @param dbPassword the dbPassword to set
+ */
+ public void setDbPassword(String dbPassword) {
+ this.dbPassword = dbPassword;
+ }
+
+ /**
+ * @param databaseBackupPeriod the databaseBackupPeriod to set
+ */
+ public void setDatabaseBackupPeriod(int databaseBackupPeriod) {
+ this.databaseBackupPeriod = databaseBackupPeriod;
+ }
+
+ /**
+ * @param recoverSuperFlat the recoverSuperFlat to set
+ */
+ public void setRecoverSuperFlat(boolean recoverSuperFlat) {
+ this.recoverSuperFlat = recoverSuperFlat;
+ }
+
+ /**
+ * @param muteDeathMessages the muteDeathMessages to set
+ */
+ public void setMuteDeathMessages(boolean muteDeathMessages) {
+ this.muteDeathMessages = muteDeathMessages;
+ }
+
+ /**
+ * @param fakePlayers the fakePlayers to set
+ */
+ public void setFakePlayers(Set fakePlayers) {
+ this.fakePlayers = fakePlayers;
+ }
+
+ /**
+ * @param allowObsidianScooping the allowObsidianScooping to set
+ */
+ public void setAllowObsidianScooping(boolean allowObsidianScooping) {
+ this.allowObsidianScooping = allowObsidianScooping;
+ }
+
+ /**
+ * @param confirmationTime the confirmationTime to set
+ */
+ public void setConfirmationTime(int confirmationTime) {
+ this.confirmationTime = confirmationTime;
+ }
+
+ /**
+ * @param closePanelOnClickOutside the closePanelOnClickOutside to set
+ */
+ public void setClosePanelOnClickOutside(boolean closePanelOnClickOutside) {
+ this.closePanelOnClickOutside = closePanelOnClickOutside;
+ }
+
+ /**
+ * @param uniqueId the uniqueId to set
+ */
+ @Override
+ public void setUniqueId(String uniqueId) {
+ this.uniqueId = uniqueId;
+ }
+
+ /**
+ * @return the customRanks
+ */
+ public Map getCustomRanks() {
+ return customRanks;
+ }
+
+ /**
+ * @param customRanks the customRanks to set
+ */
+ public void setCustomRanks(Map customRanks) {
+ this.customRanks = customRanks;
+ }
+
+ /**
+ * @return the inviteWait
+ */
+ public int getInviteWait() {
+ return inviteWait;
+ }
+
+ /**
+ * @param inviteWait the inviteWait to set
+ */
+ public void setInviteWait(int inviteWait) {
+ this.inviteWait = inviteWait;
+ }
+
+ /**
+ * @return the kickConfirmation
+ */
+ public boolean isKickConfirmation() {
+ return kickConfirmation;
+ }
+
+ /**
+ * @return the kickWait
+ */
+ public long getKickWait() {
+ return kickWait;
+ }
+
+ /**
+ * @return the leaveConfirmation
+ */
+ public boolean isLeaveConfirmation() {
+ return leaveConfirmation;
+ }
+
+ /**
+ * @return the leaveWait
+ */
+ public long getLeaveWait() {
+ return leaveWait;
+ }
+
+ /**
+ * @param kickConfirmation the kickConfirmation to set
+ */
+ public void setKickConfirmation(boolean kickConfirmation) {
+ this.kickConfirmation = kickConfirmation;
+ }
+
+ /**
+ * @param kickWait the kickWait to set
+ */
+ public void setKickWait(long kickWait) {
+ this.kickWait = kickWait;
+ }
+
+ /**
+ * @param leaveConfirmation the leaveConfirmation to set
+ */
+ public void setLeaveConfirmation(boolean leaveConfirmation) {
+ this.leaveConfirmation = leaveConfirmation;
+ }
+
+ /**
+ * @param leaveWait the leaveWait to set
+ */
+ public void setLeaveWait(long leaveWait) {
+ this.leaveWait = leaveWait;
+ }
+
+ /**
+ * @return the resetWait
+ */
+ public long getResetWait() {
+ return resetWait;
+ }
+
+ /**
+ * @param resetWait the resetWait to set
+ */
+ public void setResetWait(long resetWait) {
+ this.resetWait = resetWait;
+ }
+
+ /**
+ * @return the resetConfirmation
+ */
+ public boolean isResetConfirmation() {
+ return resetConfirmation;
+ }
+
+ /**
+ * @param resetConfirmation the resetConfirmation to set
+ */
+ public void setResetConfirmation(boolean resetConfirmation) {
+ this.resetConfirmation = resetConfirmation;
+ }
+
+ /**
+ * @return the nameMinLength
+ */
+ public int getNameMinLength() {
+ return nameMinLength;
+ }
+
+ /**
+ * @return the nameMaxLength
+ */
+ public int getNameMaxLength() {
+ return nameMaxLength;
+ }
+
+ /**
+ * @param nameMinLength the nameMinLength to set
+ */
+ public void setNameMinLength(int nameMinLength) {
+ this.nameMinLength = nameMinLength;
+ }
+
+ /**
+ * @param nameMaxLength the nameMaxLength to set
+ */
+ public void setNameMaxLength(int nameMaxLength) {
+ this.nameMaxLength = nameMaxLength;
+ }
+
+ // Getters and setters
+
+
+}
\ No newline at end of file
diff --git a/src/main/java/us/tastybento/bskyblock/api/addons/Addon.java b/src/main/java/world/bentobox/bbox/api/addons/Addon.java
similarity index 95%
rename from src/main/java/us/tastybento/bskyblock/api/addons/Addon.java
rename to src/main/java/world/bentobox/bbox/api/addons/Addon.java
index 9a88e2cdf..92cf50725 100644
--- a/src/main/java/us/tastybento/bskyblock/api/addons/Addon.java
+++ b/src/main/java/world/bentobox/bbox/api/addons/Addon.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.api.addons;
+package world.bentobox.bbox.api.addons;
import java.io.File;
import java.io.IOException;
@@ -14,9 +14,9 @@ import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.event.Listener;
-import us.tastybento.bskyblock.BSkyBlock;
-import us.tastybento.bskyblock.managers.IslandsManager;
-import us.tastybento.bskyblock.managers.PlayersManager;
+import world.bentobox.bbox.BentoBox;
+import world.bentobox.bbox.managers.IslandsManager;
+import world.bentobox.bbox.managers.PlayersManager;
/**
* Add-on class for BSkyBlock. Extend this to create an add-on. The operation
@@ -37,8 +37,8 @@ public abstract class Addon implements AddonInterface {
enabled = false;
}
- public BSkyBlock getBSkyBlock() {
- return BSkyBlock.getInstance();
+ public BentoBox getBSkyBlock() {
+ return BentoBox.getInstance();
}
/**
@@ -118,7 +118,7 @@ public abstract class Addon implements AddonInterface {
* @param listener - listener
*/
public void registerListener(Listener listener) {
- Bukkit.getPluginManager().registerEvents(listener, BSkyBlock.getInstance());
+ Bukkit.getPluginManager().registerEvents(listener, BentoBox.getInstance());
}
/**
diff --git a/src/main/java/us/tastybento/bskyblock/api/addons/AddonClassLoader.java b/src/main/java/world/bentobox/bbox/api/addons/AddonClassLoader.java
similarity index 89%
rename from src/main/java/us/tastybento/bskyblock/api/addons/AddonClassLoader.java
rename to src/main/java/world/bentobox/bbox/api/addons/AddonClassLoader.java
index c53b9d79e..29e278d8a 100644
--- a/src/main/java/us/tastybento/bskyblock/api/addons/AddonClassLoader.java
+++ b/src/main/java/world/bentobox/bbox/api/addons/AddonClassLoader.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.api.addons;
+package world.bentobox.bbox.api.addons;
import java.io.File;
import java.net.MalformedURLException;
@@ -14,11 +14,11 @@ import org.bukkit.permissions.PermissionDefault;
import org.bukkit.plugin.InvalidDescriptionException;
import org.bukkit.util.permissions.DefaultPermissions;
-import us.tastybento.bskyblock.BSkyBlock;
-import us.tastybento.bskyblock.api.addons.AddonDescription.AddonDescriptionBuilder;
-import us.tastybento.bskyblock.api.addons.exception.InvalidAddonFormatException;
-import us.tastybento.bskyblock.api.addons.exception.InvalidAddonInheritException;
-import us.tastybento.bskyblock.managers.AddonsManager;
+import world.bentobox.bbox.BentoBox;
+import world.bentobox.bbox.api.addons.AddonDescription.AddonDescriptionBuilder;
+import world.bentobox.bbox.api.addons.exception.InvalidAddonFormatException;
+import world.bentobox.bbox.api.addons.exception.InvalidAddonInheritException;
+import world.bentobox.bbox.managers.AddonsManager;
/**
* Loads addons and sets up permissions
@@ -49,7 +49,7 @@ public class AddonClassLoader extends URLClassLoader {
throw new InvalidAddonFormatException("Packages declaration cannot start with 'us.tastybento'");
}
} catch (ClassNotFoundException e) {
- BSkyBlock.getInstance().logError("Could not load '" + path.getName() + "' in folder '" + path.getParent() + "' - invalid addon.yml");
+ BentoBox.getInstance().logError("Could not load '" + path.getName() + "' in folder '" + path.getParent() + "' - invalid addon.yml");
throw new InvalidDescriptionException("Invalid addon.yml");
}
diff --git a/src/main/java/us/tastybento/bskyblock/api/addons/AddonDescription.java b/src/main/java/world/bentobox/bbox/api/addons/AddonDescription.java
similarity index 98%
rename from src/main/java/us/tastybento/bskyblock/api/addons/AddonDescription.java
rename to src/main/java/world/bentobox/bbox/api/addons/AddonDescription.java
index 22372fa45..f66294833 100644
--- a/src/main/java/us/tastybento/bskyblock/api/addons/AddonDescription.java
+++ b/src/main/java/world/bentobox/bbox/api/addons/AddonDescription.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.api.addons;
+package world.bentobox.bbox.api.addons;
import java.util.Arrays;
import java.util.List;
diff --git a/src/main/java/us/tastybento/bskyblock/api/addons/AddonInterface.java b/src/main/java/world/bentobox/bbox/api/addons/AddonInterface.java
similarity index 71%
rename from src/main/java/us/tastybento/bskyblock/api/addons/AddonInterface.java
rename to src/main/java/world/bentobox/bbox/api/addons/AddonInterface.java
index 07fb8250e..0ca0b1711 100644
--- a/src/main/java/us/tastybento/bskyblock/api/addons/AddonInterface.java
+++ b/src/main/java/world/bentobox/bbox/api/addons/AddonInterface.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.api.addons;
+package world.bentobox.bbox.api.addons;
public interface AddonInterface {
void onEnable();
diff --git a/src/main/java/us/tastybento/bskyblock/api/addons/AddonState.java b/src/main/java/world/bentobox/bbox/api/addons/AddonState.java
similarity index 93%
rename from src/main/java/us/tastybento/bskyblock/api/addons/AddonState.java
rename to src/main/java/world/bentobox/bbox/api/addons/AddonState.java
index 47d252e56..d5f4fda6b 100644
--- a/src/main/java/us/tastybento/bskyblock/api/addons/AddonState.java
+++ b/src/main/java/world/bentobox/bbox/api/addons/AddonState.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.api.addons;
+package world.bentobox.bbox.api.addons;
/**
* Represents the current run-time state of a {@link Addon}.
diff --git a/src/main/java/us/tastybento/bskyblock/api/addons/exception/AddonException.java b/src/main/java/world/bentobox/bbox/api/addons/exception/AddonException.java
similarity index 82%
rename from src/main/java/us/tastybento/bskyblock/api/addons/exception/AddonException.java
rename to src/main/java/world/bentobox/bbox/api/addons/exception/AddonException.java
index 0c15d3988..f5a5915d3 100644
--- a/src/main/java/us/tastybento/bskyblock/api/addons/exception/AddonException.java
+++ b/src/main/java/world/bentobox/bbox/api/addons/exception/AddonException.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.api.addons.exception;
+package world.bentobox.bbox.api.addons.exception;
public abstract class AddonException extends Exception {
diff --git a/src/main/java/us/tastybento/bskyblock/api/addons/exception/InvalidAddonFormatException.java b/src/main/java/world/bentobox/bbox/api/addons/exception/InvalidAddonFormatException.java
similarity index 93%
rename from src/main/java/us/tastybento/bskyblock/api/addons/exception/InvalidAddonFormatException.java
rename to src/main/java/world/bentobox/bbox/api/addons/exception/InvalidAddonFormatException.java
index 761630bb1..f09625792 100644
--- a/src/main/java/us/tastybento/bskyblock/api/addons/exception/InvalidAddonFormatException.java
+++ b/src/main/java/world/bentobox/bbox/api/addons/exception/InvalidAddonFormatException.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.api.addons.exception;
+package world.bentobox.bbox.api.addons.exception;
import java.util.logging.Level;
diff --git a/src/main/java/us/tastybento/bskyblock/api/addons/exception/InvalidAddonInheritException.java b/src/main/java/world/bentobox/bbox/api/addons/exception/InvalidAddonInheritException.java
similarity index 83%
rename from src/main/java/us/tastybento/bskyblock/api/addons/exception/InvalidAddonInheritException.java
rename to src/main/java/world/bentobox/bbox/api/addons/exception/InvalidAddonInheritException.java
index 42b56c27b..21c0b2357 100644
--- a/src/main/java/us/tastybento/bskyblock/api/addons/exception/InvalidAddonInheritException.java
+++ b/src/main/java/world/bentobox/bbox/api/addons/exception/InvalidAddonInheritException.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.api.addons.exception;
+package world.bentobox.bbox.api.addons.exception;
public class InvalidAddonInheritException extends AddonException {
diff --git a/src/main/java/us/tastybento/bskyblock/api/commands/BSBCommand.java b/src/main/java/world/bentobox/bbox/api/commands/BSBCommand.java
similarity index 93%
rename from src/main/java/us/tastybento/bskyblock/api/commands/BSBCommand.java
rename to src/main/java/world/bentobox/bbox/api/commands/BSBCommand.java
index 5f7be5969..47eb4cf9b 100644
--- a/src/main/java/us/tastybento/bskyblock/api/commands/BSBCommand.java
+++ b/src/main/java/world/bentobox/bbox/api/commands/BSBCommand.java
@@ -1,9 +1,9 @@
-package us.tastybento.bskyblock.api.commands;
+package world.bentobox.bbox.api.commands;
import java.util.List;
import java.util.Optional;
-import us.tastybento.bskyblock.api.user.User;
+import world.bentobox.bbox.api.user.User;
/**
* Interface for BSkyBlock Commands
diff --git a/src/main/java/us/tastybento/bskyblock/api/commands/CompositeCommand.java b/src/main/java/world/bentobox/bbox/api/commands/CompositeCommand.java
similarity index 96%
rename from src/main/java/us/tastybento/bskyblock/api/commands/CompositeCommand.java
rename to src/main/java/world/bentobox/bbox/api/commands/CompositeCommand.java
index ccda8f9e0..7f77562a6 100644
--- a/src/main/java/us/tastybento/bskyblock/api/commands/CompositeCommand.java
+++ b/src/main/java/world/bentobox/bbox/api/commands/CompositeCommand.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.api.commands;
+package world.bentobox.bbox.api.commands;
import java.util.ArrayList;
import java.util.Arrays;
@@ -21,16 +21,16 @@ import org.bukkit.command.PluginIdentifiableCommand;
import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitTask;
-import us.tastybento.bskyblock.BSkyBlock;
-import us.tastybento.bskyblock.Settings;
-import us.tastybento.bskyblock.api.addons.Addon;
-import us.tastybento.bskyblock.api.events.command.CommandEvent;
-import us.tastybento.bskyblock.api.localization.TextVariables;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.managers.IslandWorldManager;
-import us.tastybento.bskyblock.managers.IslandsManager;
-import us.tastybento.bskyblock.managers.PlayersManager;
-import us.tastybento.bskyblock.util.Util;
+import world.bentobox.bbox.BentoBox;
+import world.bentobox.bbox.Settings;
+import world.bentobox.bbox.api.addons.Addon;
+import world.bentobox.bbox.api.events.command.CommandEvent;
+import world.bentobox.bbox.api.localization.TextVariables;
+import world.bentobox.bbox.api.user.User;
+import world.bentobox.bbox.managers.IslandWorldManager;
+import world.bentobox.bbox.managers.IslandsManager;
+import world.bentobox.bbox.managers.PlayersManager;
+import world.bentobox.bbox.util.Util;
/**
* BSB composite command
@@ -39,7 +39,7 @@ import us.tastybento.bskyblock.util.Util;
*/
public abstract class CompositeCommand extends Command implements PluginIdentifiableCommand, BSBCommand {
- private final BSkyBlock plugin;
+ private final BentoBox plugin;
/**
* True if the command is for the player only (not for the console)
@@ -108,7 +108,7 @@ public abstract class CompositeCommand extends Command implements PluginIdentifi
super(label);
this.addon = addon;
this.topLabel = label;
- this.plugin = BSkyBlock.getInstance();
+ this.plugin = BentoBox.getInstance();
setAliases(new ArrayList<>(Arrays.asList(aliases)));
parent = null;
setUsage("");
@@ -143,7 +143,7 @@ public abstract class CompositeCommand extends Command implements PluginIdentifi
public CompositeCommand(CompositeCommand parent, String label, String... aliases) {
super(label);
this.topLabel = parent.getTopLabel();
- this.plugin = BSkyBlock.getInstance();
+ this.plugin = BentoBox.getInstance();
this.parent = parent;
subCommandLevel = parent.getLevel() + 1;
// Add this sub-command to the parent
@@ -287,7 +287,7 @@ public abstract class CompositeCommand extends Command implements PluginIdentifi
}
@Override
- public BSkyBlock getPlugin() {
+ public BentoBox getPlugin() {
return plugin;
}
diff --git a/src/main/java/us/tastybento/bskyblock/api/commands/DefaultHelpCommand.java b/src/main/java/world/bentobox/bbox/api/commands/DefaultHelpCommand.java
similarity index 96%
rename from src/main/java/us/tastybento/bskyblock/api/commands/DefaultHelpCommand.java
rename to src/main/java/world/bentobox/bbox/api/commands/DefaultHelpCommand.java
index 7167f5a1a..2cee7842a 100644
--- a/src/main/java/us/tastybento/bskyblock/api/commands/DefaultHelpCommand.java
+++ b/src/main/java/world/bentobox/bbox/api/commands/DefaultHelpCommand.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.api.commands;
+package world.bentobox.bbox.api.commands;
import java.util.Collections;
import java.util.List;
@@ -6,8 +6,8 @@ import java.util.Optional;
import org.apache.commons.lang.math.NumberUtils;
-import us.tastybento.bskyblock.api.localization.TextVariables;
-import us.tastybento.bskyblock.api.user.User;
+import world.bentobox.bbox.api.localization.TextVariables;
+import world.bentobox.bbox.api.user.User;
/**
* Adds a default help to every command that will show the usage of the command
diff --git a/src/main/java/us/tastybento/bskyblock/api/configuration/BSBConfig.java b/src/main/java/world/bentobox/bbox/api/configuration/BSBConfig.java
similarity index 89%
rename from src/main/java/us/tastybento/bskyblock/api/configuration/BSBConfig.java
rename to src/main/java/world/bentobox/bbox/api/configuration/BSBConfig.java
index 9bcf1b582..701597c49 100644
--- a/src/main/java/us/tastybento/bskyblock/api/configuration/BSBConfig.java
+++ b/src/main/java/world/bentobox/bbox/api/configuration/BSBConfig.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.api.configuration;
+package world.bentobox.bbox.api.configuration;
import java.beans.IntrospectionException;
import java.lang.reflect.InvocationTargetException;
@@ -6,10 +6,10 @@ import java.util.ArrayList;
import java.util.List;
import java.util.logging.Logger;
-import us.tastybento.bskyblock.BSkyBlock;
-import us.tastybento.bskyblock.api.addons.Addon;
-import us.tastybento.bskyblock.database.AbstractDatabaseHandler;
-import us.tastybento.bskyblock.database.flatfile.FlatFileDatabase;
+import world.bentobox.bbox.BentoBox;
+import world.bentobox.bbox.api.addons.Addon;
+import world.bentobox.bbox.database.AbstractDatabaseHandler;
+import world.bentobox.bbox.database.flatfile.FlatFileDatabase;
/**
* Handy config class to store and load Java POJOs as YAML configs
@@ -23,7 +23,7 @@ public class BSBConfig {
private Logger logger;
@SuppressWarnings("unchecked")
- public BSBConfig(BSkyBlock plugin, Class type) {
+ public BSBConfig(BentoBox plugin, Class type) {
this.logger = plugin.getLogger();
handler = (AbstractDatabaseHandler) new FlatFileDatabase().getHandler(type);
}
diff --git a/src/main/java/us/tastybento/bskyblock/api/configuration/ConfigComment.java b/src/main/java/world/bentobox/bbox/api/configuration/ConfigComment.java
similarity index 92%
rename from src/main/java/us/tastybento/bskyblock/api/configuration/ConfigComment.java
rename to src/main/java/world/bentobox/bbox/api/configuration/ConfigComment.java
index 75aafdb7f..e4a5c6af2 100644
--- a/src/main/java/us/tastybento/bskyblock/api/configuration/ConfigComment.java
+++ b/src/main/java/world/bentobox/bbox/api/configuration/ConfigComment.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.api.configuration;
+package world.bentobox.bbox.api.configuration;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
diff --git a/src/main/java/us/tastybento/bskyblock/api/configuration/ConfigEntry.java b/src/main/java/world/bentobox/bbox/api/configuration/ConfigEntry.java
similarity index 84%
rename from src/main/java/us/tastybento/bskyblock/api/configuration/ConfigEntry.java
rename to src/main/java/world/bentobox/bbox/api/configuration/ConfigEntry.java
index b81c5a15c..5b2af5550 100644
--- a/src/main/java/us/tastybento/bskyblock/api/configuration/ConfigEntry.java
+++ b/src/main/java/world/bentobox/bbox/api/configuration/ConfigEntry.java
@@ -1,11 +1,11 @@
-package us.tastybento.bskyblock.api.configuration;
+package world.bentobox.bbox.api.configuration;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
-import us.tastybento.bskyblock.Constants.GameType;
+import world.bentobox.bbox.Constants.GameType;
/**
*
diff --git a/src/main/java/us/tastybento/bskyblock/api/configuration/StoreAt.java b/src/main/java/world/bentobox/bbox/api/configuration/StoreAt.java
similarity index 91%
rename from src/main/java/us/tastybento/bskyblock/api/configuration/StoreAt.java
rename to src/main/java/world/bentobox/bbox/api/configuration/StoreAt.java
index f6f63b03a..021915a3c 100644
--- a/src/main/java/us/tastybento/bskyblock/api/configuration/StoreAt.java
+++ b/src/main/java/world/bentobox/bbox/api/configuration/StoreAt.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.api.configuration;
+package world.bentobox.bbox.api.configuration;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
diff --git a/src/main/java/us/tastybento/bskyblock/api/configuration/WorldSettings.java b/src/main/java/world/bentobox/bbox/api/configuration/WorldSettings.java
similarity index 93%
rename from src/main/java/us/tastybento/bskyblock/api/configuration/WorldSettings.java
rename to src/main/java/world/bentobox/bbox/api/configuration/WorldSettings.java
index 9380fed83..060c8b382 100644
--- a/src/main/java/us/tastybento/bskyblock/api/configuration/WorldSettings.java
+++ b/src/main/java/world/bentobox/bbox/api/configuration/WorldSettings.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.api.configuration;
+package world.bentobox.bbox.api.configuration;
import java.util.List;
import java.util.Map;
@@ -9,8 +9,8 @@ import org.bukkit.Difficulty;
import org.bukkit.GameMode;
import org.bukkit.entity.EntityType;
-import us.tastybento.bskyblock.api.addons.Addon;
-import us.tastybento.bskyblock.api.flags.Flag;
+import world.bentobox.bbox.api.addons.Addon;
+import world.bentobox.bbox.api.flags.Flag;
/**
* Contains world-specific settings. Only getters are required, but you may need setters for your own class.
@@ -251,4 +251,14 @@ public interface WorldSettings {
* Set the island reset time stamp. Any player who last logged in before this time will have resets zeroed
*/
void setResetEpoch(long timestamp);
+
+ /**
+ * @return true if the death count should be reset when joining a team in this world
+ */
+ boolean isTeamJoinDeathReset();
+
+ /**
+ * @return max number of deaths for this world
+ */
+ int getDeathsMax();
}
diff --git a/src/main/java/us/tastybento/bskyblock/api/events/BSBReadyEvent.java b/src/main/java/world/bentobox/bbox/api/events/BentoBoxReadyEvent.java
similarity index 54%
rename from src/main/java/us/tastybento/bskyblock/api/events/BSBReadyEvent.java
rename to src/main/java/world/bentobox/bbox/api/events/BentoBoxReadyEvent.java
index 41da85eed..fdeb5dad5 100644
--- a/src/main/java/us/tastybento/bskyblock/api/events/BSBReadyEvent.java
+++ b/src/main/java/world/bentobox/bbox/api/events/BentoBoxReadyEvent.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.api.events;
+package world.bentobox.bbox.api.events;
/**
* Fired when BSkyBlock is ready to play and all files are loaded
@@ -6,4 +6,4 @@ package us.tastybento.bskyblock.api.events;
* @author tastybento
* @since 1.0
*/
-public class BSBReadyEvent extends PremadeEvent {}
+public class BentoBoxReadyEvent extends PremadeEvent {}
diff --git a/src/main/java/us/tastybento/bskyblock/api/events/IslandBaseEvent.java b/src/main/java/world/bentobox/bbox/api/events/IslandBaseEvent.java
similarity index 94%
rename from src/main/java/us/tastybento/bskyblock/api/events/IslandBaseEvent.java
rename to src/main/java/world/bentobox/bbox/api/events/IslandBaseEvent.java
index 3d93c9d1b..5bb3313e0 100644
--- a/src/main/java/us/tastybento/bskyblock/api/events/IslandBaseEvent.java
+++ b/src/main/java/world/bentobox/bbox/api/events/IslandBaseEvent.java
@@ -1,11 +1,11 @@
-package us.tastybento.bskyblock.api.events;
+package world.bentobox.bbox.api.events;
import java.util.UUID;
import org.bukkit.Location;
import org.bukkit.event.Cancellable;
-import us.tastybento.bskyblock.database.objects.Island;
+import world.bentobox.bbox.database.objects.Island;
/**
*
diff --git a/src/main/java/us/tastybento/bskyblock/api/events/PremadeEvent.java b/src/main/java/world/bentobox/bbox/api/events/PremadeEvent.java
similarity index 89%
rename from src/main/java/us/tastybento/bskyblock/api/events/PremadeEvent.java
rename to src/main/java/world/bentobox/bbox/api/events/PremadeEvent.java
index e1630e52d..27d411987 100644
--- a/src/main/java/us/tastybento/bskyblock/api/events/PremadeEvent.java
+++ b/src/main/java/world/bentobox/bbox/api/events/PremadeEvent.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.api.events;
+package world.bentobox.bbox.api.events;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
diff --git a/src/main/java/us/tastybento/bskyblock/api/events/addon/AddonBaseEvent.java b/src/main/java/world/bentobox/bbox/api/events/addon/AddonBaseEvent.java
similarity index 64%
rename from src/main/java/us/tastybento/bskyblock/api/events/addon/AddonBaseEvent.java
rename to src/main/java/world/bentobox/bbox/api/events/addon/AddonBaseEvent.java
index cc8c4d3ec..c27bedc80 100644
--- a/src/main/java/us/tastybento/bskyblock/api/events/addon/AddonBaseEvent.java
+++ b/src/main/java/world/bentobox/bbox/api/events/addon/AddonBaseEvent.java
@@ -1,7 +1,7 @@
-package us.tastybento.bskyblock.api.events.addon;
+package world.bentobox.bbox.api.events.addon;
-import us.tastybento.bskyblock.api.addons.Addon;
-import us.tastybento.bskyblock.api.events.PremadeEvent;
+import world.bentobox.bbox.api.addons.Addon;
+import world.bentobox.bbox.api.events.PremadeEvent;
/**
* @author Poslovitch
diff --git a/src/main/java/us/tastybento/bskyblock/api/events/addon/AddonEvent.java b/src/main/java/world/bentobox/bbox/api/events/addon/AddonEvent.java
similarity index 95%
rename from src/main/java/us/tastybento/bskyblock/api/events/addon/AddonEvent.java
rename to src/main/java/world/bentobox/bbox/api/events/addon/AddonEvent.java
index 9a71f1b55..db42b6e6a 100644
--- a/src/main/java/us/tastybento/bskyblock/api/events/addon/AddonEvent.java
+++ b/src/main/java/world/bentobox/bbox/api/events/addon/AddonEvent.java
@@ -1,6 +1,6 @@
-package us.tastybento.bskyblock.api.events.addon;
+package world.bentobox.bbox.api.events.addon;
-import us.tastybento.bskyblock.api.addons.Addon;
+import world.bentobox.bbox.api.addons.Addon;
public class AddonEvent {
diff --git a/src/main/java/us/tastybento/bskyblock/api/events/command/CommandEvent.java b/src/main/java/world/bentobox/bbox/api/events/command/CommandEvent.java
similarity index 95%
rename from src/main/java/us/tastybento/bskyblock/api/events/command/CommandEvent.java
rename to src/main/java/world/bentobox/bbox/api/events/command/CommandEvent.java
index 119ad869e..29e781b97 100644
--- a/src/main/java/us/tastybento/bskyblock/api/events/command/CommandEvent.java
+++ b/src/main/java/world/bentobox/bbox/api/events/command/CommandEvent.java
@@ -1,10 +1,10 @@
-package us.tastybento.bskyblock.api.events.command;
+package world.bentobox.bbox.api.events.command;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.event.Cancellable;
-import us.tastybento.bskyblock.api.events.PremadeEvent;
+import world.bentobox.bbox.api.events.PremadeEvent;
/**
* Fired when a team event happens.
diff --git a/src/main/java/us/tastybento/bskyblock/api/events/island/FlagChangeEvent.java b/src/main/java/world/bentobox/bbox/api/events/island/FlagChangeEvent.java
similarity index 83%
rename from src/main/java/us/tastybento/bskyblock/api/events/island/FlagChangeEvent.java
rename to src/main/java/world/bentobox/bbox/api/events/island/FlagChangeEvent.java
index 0d416b713..95a9cfbee 100644
--- a/src/main/java/us/tastybento/bskyblock/api/events/island/FlagChangeEvent.java
+++ b/src/main/java/world/bentobox/bbox/api/events/island/FlagChangeEvent.java
@@ -1,10 +1,10 @@
-package us.tastybento.bskyblock.api.events.island;
+package world.bentobox.bbox.api.events.island;
import java.util.UUID;
-import us.tastybento.bskyblock.api.events.IslandBaseEvent;
-import us.tastybento.bskyblock.api.flags.Flag;
-import us.tastybento.bskyblock.database.objects.Island;
+import world.bentobox.bbox.api.events.IslandBaseEvent;
+import world.bentobox.bbox.api.flags.Flag;
+import world.bentobox.bbox.database.objects.Island;
/**
* This event is fired when a player changes a flag on his island
diff --git a/src/main/java/us/tastybento/bskyblock/api/events/island/IslandEvent.java b/src/main/java/world/bentobox/bbox/api/events/island/IslandEvent.java
similarity index 98%
rename from src/main/java/us/tastybento/bskyblock/api/events/island/IslandEvent.java
rename to src/main/java/world/bentobox/bbox/api/events/island/IslandEvent.java
index 4804272c0..2fc528230 100644
--- a/src/main/java/us/tastybento/bskyblock/api/events/island/IslandEvent.java
+++ b/src/main/java/world/bentobox/bbox/api/events/island/IslandEvent.java
@@ -1,12 +1,12 @@
-package us.tastybento.bskyblock.api.events.island;
+package world.bentobox.bbox.api.events.island;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.Location;
-import us.tastybento.bskyblock.api.events.IslandBaseEvent;
-import us.tastybento.bskyblock.database.objects.Island;
+import world.bentobox.bbox.api.events.IslandBaseEvent;
+import world.bentobox.bbox.database.objects.Island;
/**
* Fired when a team event happens.
diff --git a/src/main/java/us/tastybento/bskyblock/api/events/purge/PurgeDeleteIslandEvent.java b/src/main/java/world/bentobox/bbox/api/events/purge/PurgeDeleteIslandEvent.java
similarity index 72%
rename from src/main/java/us/tastybento/bskyblock/api/events/purge/PurgeDeleteIslandEvent.java
rename to src/main/java/world/bentobox/bbox/api/events/purge/PurgeDeleteIslandEvent.java
index 9f4360245..3da9c826e 100644
--- a/src/main/java/us/tastybento/bskyblock/api/events/purge/PurgeDeleteIslandEvent.java
+++ b/src/main/java/world/bentobox/bbox/api/events/purge/PurgeDeleteIslandEvent.java
@@ -1,7 +1,7 @@
-package us.tastybento.bskyblock.api.events.purge;
+package world.bentobox.bbox.api.events.purge;
-import us.tastybento.bskyblock.api.events.IslandBaseEvent;
-import us.tastybento.bskyblock.database.objects.Island;
+import world.bentobox.bbox.api.events.IslandBaseEvent;
+import world.bentobox.bbox.database.objects.Island;
/**
* This event is fired before an island is going to be purged.
diff --git a/src/main/java/us/tastybento/bskyblock/api/events/purge/PurgeStartEvent.java b/src/main/java/world/bentobox/bbox/api/events/purge/PurgeStartEvent.java
similarity index 95%
rename from src/main/java/us/tastybento/bskyblock/api/events/purge/PurgeStartEvent.java
rename to src/main/java/world/bentobox/bbox/api/events/purge/PurgeStartEvent.java
index 2ecae337e..206fd6143 100644
--- a/src/main/java/us/tastybento/bskyblock/api/events/purge/PurgeStartEvent.java
+++ b/src/main/java/world/bentobox/bbox/api/events/purge/PurgeStartEvent.java
@@ -1,11 +1,11 @@
-package us.tastybento.bskyblock.api.events.purge;
+package world.bentobox.bbox.api.events.purge;
import java.util.List;
import java.util.UUID;
import org.bukkit.event.Cancellable;
-import us.tastybento.bskyblock.api.events.PremadeEvent;
+import world.bentobox.bbox.api.events.PremadeEvent;
/**
* This event is fired when islands to remove have been chosen and before starting to remove them.
diff --git a/src/main/java/us/tastybento/bskyblock/api/events/team/TeamEvent.java b/src/main/java/world/bentobox/bbox/api/events/team/TeamEvent.java
similarity index 97%
rename from src/main/java/us/tastybento/bskyblock/api/events/team/TeamEvent.java
rename to src/main/java/world/bentobox/bbox/api/events/team/TeamEvent.java
index c53daba2b..f61ceb2c1 100644
--- a/src/main/java/us/tastybento/bskyblock/api/events/team/TeamEvent.java
+++ b/src/main/java/world/bentobox/bbox/api/events/team/TeamEvent.java
@@ -1,11 +1,11 @@
-package us.tastybento.bskyblock.api.events.team;
+package world.bentobox.bbox.api.events.team;
import java.util.UUID;
import org.bukkit.Location;
-import us.tastybento.bskyblock.api.events.IslandBaseEvent;
-import us.tastybento.bskyblock.database.objects.Island;
+import world.bentobox.bbox.api.events.IslandBaseEvent;
+import world.bentobox.bbox.database.objects.Island;
/**
* Fired when a team event happens.
diff --git a/src/main/java/us/tastybento/bskyblock/api/flags/AbstractFlagListener.java b/src/main/java/world/bentobox/bbox/api/flags/AbstractFlagListener.java
similarity index 90%
rename from src/main/java/us/tastybento/bskyblock/api/flags/AbstractFlagListener.java
rename to src/main/java/world/bentobox/bbox/api/flags/AbstractFlagListener.java
index 9941baa50..aad9d6c62 100644
--- a/src/main/java/us/tastybento/bskyblock/api/flags/AbstractFlagListener.java
+++ b/src/main/java/world/bentobox/bbox/api/flags/AbstractFlagListener.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.api.flags;
+package world.bentobox.bbox.api.flags;
import java.lang.reflect.Method;
import java.util.Optional;
@@ -9,12 +9,12 @@ import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.Listener;
-import us.tastybento.bskyblock.BSkyBlock;
-import us.tastybento.bskyblock.api.localization.TextVariables;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.database.objects.Island;
-import us.tastybento.bskyblock.managers.IslandWorldManager;
-import us.tastybento.bskyblock.managers.IslandsManager;
+import world.bentobox.bbox.BentoBox;
+import world.bentobox.bbox.api.localization.TextVariables;
+import world.bentobox.bbox.api.user.User;
+import world.bentobox.bbox.database.objects.Island;
+import world.bentobox.bbox.managers.IslandWorldManager;
+import world.bentobox.bbox.managers.IslandsManager;
/**
* Abstract class for flag listeners. Provides common code.
@@ -23,13 +23,13 @@ import us.tastybento.bskyblock.managers.IslandsManager;
*/
public abstract class AbstractFlagListener implements Listener {
- private BSkyBlock plugin = BSkyBlock.getInstance();
+ private BentoBox plugin = BentoBox.getInstance();
private User user = null;
/**
* @return the plugin
*/
- public BSkyBlock getPlugin() {
+ public BentoBox getPlugin() {
return plugin;
}
@@ -37,7 +37,7 @@ public abstract class AbstractFlagListener implements Listener {
* Used for unit testing only to set the plugin
* @param plugin - BSkyBlock plugin object
*/
- public void setPlugin(BSkyBlock plugin) {
+ public void setPlugin(BentoBox plugin) {
this.plugin = plugin;
}
@@ -106,7 +106,7 @@ public abstract class AbstractFlagListener implements Listener {
* Check if flag is allowed at location
* @param e - event
* @param loc - location
- * @param flag - flag {@link us.tastybento.bskyblock.lists.Flags}
+ * @param flag - flag {@link world.bentobox.bbox.lists.Flags}
* @return true if allowed, false if not
*/
public boolean checkIsland(Event e, Location loc, Flag flag) {
@@ -117,7 +117,7 @@ public abstract class AbstractFlagListener implements Listener {
* Check if flag is allowed at location
* @param e - event
* @param loc - location
- * @param flag - flag {@link us.tastybento.bskyblock.lists.Flags}
+ * @param flag - flag {@link world.bentobox.bbox.lists.Flags}
* @param silent - if true, no attempt is made to tell the user
* @return true if the check is okay, false if it was disallowed
*/
diff --git a/src/main/java/us/tastybento/bskyblock/api/flags/Flag.java b/src/main/java/world/bentobox/bbox/api/flags/Flag.java
similarity index 91%
rename from src/main/java/us/tastybento/bskyblock/api/flags/Flag.java
rename to src/main/java/world/bentobox/bbox/api/flags/Flag.java
index 2aba31670..aa2ae6d8e 100644
--- a/src/main/java/us/tastybento/bskyblock/api/flags/Flag.java
+++ b/src/main/java/world/bentobox/bbox/api/flags/Flag.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.api.flags;
+package world.bentobox.bbox.api.flags;
import java.util.Optional;
@@ -7,20 +7,20 @@ import org.bukkit.World;
import org.bukkit.event.Listener;
import org.bukkit.inventory.ItemStack;
-import us.tastybento.bskyblock.BSkyBlock;
-import us.tastybento.bskyblock.api.configuration.WorldSettings;
-import us.tastybento.bskyblock.api.localization.TextVariables;
-import us.tastybento.bskyblock.api.panels.PanelItem;
-import us.tastybento.bskyblock.api.panels.builders.PanelItemBuilder;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.database.objects.Island;
-import us.tastybento.bskyblock.managers.RanksManager;
+import world.bentobox.bbox.BentoBox;
+import world.bentobox.bbox.api.configuration.WorldSettings;
+import world.bentobox.bbox.api.localization.TextVariables;
+import world.bentobox.bbox.api.panels.PanelItem;
+import world.bentobox.bbox.api.panels.builders.PanelItemBuilder;
+import world.bentobox.bbox.api.user.User;
+import world.bentobox.bbox.database.objects.Island;
+import world.bentobox.bbox.managers.RanksManager;
public class Flag implements Comparable {
public enum Type {
PROTECTION(Material.SHIELD),
- SETTING(Material.COMMAND),
+ SETTING(Material.STONE),
WORLD_SETTING(Material.GRASS);
private Material icon;
@@ -75,7 +75,7 @@ public class Flag implements Comparable {
*/
public boolean isSetForWorld(World world) {
if (type.equals(Type.WORLD_SETTING)) {
- WorldSettings ws = BSkyBlock.getInstance().getIWM().getWorldSettings(world);
+ WorldSettings ws = BentoBox.getInstance().getIWM().getWorldSettings(world);
if (ws != null) {
ws.getWorldFlags().putIfAbsent(getID(), setting);
return ws.getWorldFlags().get(getID());
@@ -94,7 +94,7 @@ public class Flag implements Comparable {
*/
public void setSetting(World world, boolean setting) {
if (getType().equals(Type.WORLD_SETTING)) {
- BSkyBlock.getInstance().getIWM().getWorldSettings(world).getWorldFlags().put(getID(), setting);
+ BentoBox.getInstance().getIWM().getWorldSettings(world).getWorldFlags().put(getID(), setting);
}
}
@@ -183,7 +183,7 @@ public class Flag implements Comparable {
* @param user - user that will see this flag
* @return - PanelItem for this flag
*/
- public PanelItem toPanelItem(BSkyBlock plugin, User user) {
+ public PanelItem toPanelItem(BentoBox plugin, User user) {
// Start the flag conversion
PanelItemBuilder pib = new PanelItemBuilder()
.icon(new ItemStack(icon))
@@ -200,7 +200,7 @@ public class Flag implements Comparable {
pib.description(user.getTranslation("protection.panel.flag-item.setting-layout", TextVariables.DESCRIPTION, user.getTranslation(getDescriptionReference())
, "[setting]", worldDetting));
return pib.build();
- }
+ }
// Get the island this user is on or their own
Island island = plugin.getIslands().getIslandAt(user.getLocation()).orElse(plugin.getIslands().getIsland(user.getWorld(), user.getUniqueId()));
diff --git a/src/main/java/us/tastybento/bskyblock/api/flags/FlagBuilder.java b/src/main/java/world/bentobox/bbox/api/flags/FlagBuilder.java
similarity index 86%
rename from src/main/java/us/tastybento/bskyblock/api/flags/FlagBuilder.java
rename to src/main/java/world/bentobox/bbox/api/flags/FlagBuilder.java
index d1bc5e914..741a6789c 100644
--- a/src/main/java/us/tastybento/bskyblock/api/flags/FlagBuilder.java
+++ b/src/main/java/world/bentobox/bbox/api/flags/FlagBuilder.java
@@ -1,14 +1,14 @@
-package us.tastybento.bskyblock.api.flags;
+package world.bentobox.bbox.api.flags;
import org.bukkit.Material;
import org.bukkit.event.Listener;
-import us.tastybento.bskyblock.api.flags.Flag.Type;
-import us.tastybento.bskyblock.api.flags.clicklisteners.CycleClick;
-import us.tastybento.bskyblock.api.flags.clicklisteners.IslandToggleClick;
-import us.tastybento.bskyblock.api.flags.clicklisteners.WorldToggleClick;
-import us.tastybento.bskyblock.api.panels.PanelItem;
-import us.tastybento.bskyblock.managers.RanksManager;
+import world.bentobox.bbox.api.flags.Flag.Type;
+import world.bentobox.bbox.api.flags.clicklisteners.CycleClick;
+import world.bentobox.bbox.api.flags.clicklisteners.IslandToggleClick;
+import world.bentobox.bbox.api.flags.clicklisteners.WorldToggleClick;
+import world.bentobox.bbox.api.panels.PanelItem;
+import world.bentobox.bbox.managers.RanksManager;
public class FlagBuilder {
@@ -109,7 +109,7 @@ public class FlagBuilder {
/**
* Adds a listener for clicks on this flag when it is a panel item. Default is
- * {@link us.tastybento.bskyblock.api.flags.clicklisteners.CycleClick}
+ * {@link world.bentobox.bbox.api.flags.clicklisteners.CycleClick}
* @param onClickListener - the listener for clicks. Must use the ClickOn interface
* @return FlagBuilder
*/
diff --git a/src/main/java/us/tastybento/bskyblock/api/flags/clicklisteners/CycleClick.java b/src/main/java/world/bentobox/bbox/api/flags/clicklisteners/CycleClick.java
similarity index 84%
rename from src/main/java/us/tastybento/bskyblock/api/flags/clicklisteners/CycleClick.java
rename to src/main/java/world/bentobox/bbox/api/flags/clicklisteners/CycleClick.java
index f2a260712..086386256 100644
--- a/src/main/java/us/tastybento/bskyblock/api/flags/clicklisteners/CycleClick.java
+++ b/src/main/java/world/bentobox/bbox/api/flags/clicklisteners/CycleClick.java
@@ -1,16 +1,16 @@
-package us.tastybento.bskyblock.api.flags.clicklisteners;
+package world.bentobox.bbox.api.flags.clicklisteners;
import org.bukkit.Sound;
import org.bukkit.event.inventory.ClickType;
-import us.tastybento.bskyblock.BSkyBlock;
-import us.tastybento.bskyblock.api.flags.Flag;
-import us.tastybento.bskyblock.api.panels.Panel;
-import us.tastybento.bskyblock.api.panels.PanelItem;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.database.objects.Island;
-import us.tastybento.bskyblock.managers.RanksManager;
-import us.tastybento.bskyblock.util.Util;
+import world.bentobox.bbox.BentoBox;
+import world.bentobox.bbox.api.flags.Flag;
+import world.bentobox.bbox.api.panels.Panel;
+import world.bentobox.bbox.api.panels.PanelItem;
+import world.bentobox.bbox.api.user.User;
+import world.bentobox.bbox.database.objects.Island;
+import world.bentobox.bbox.managers.RanksManager;
+import world.bentobox.bbox.util.Util;
/**
* Left Clicks increase rank, right clicks lower rank
@@ -19,7 +19,7 @@ import us.tastybento.bskyblock.util.Util;
*/
public class CycleClick implements PanelItem.ClickHandler {
- private BSkyBlock plugin = BSkyBlock.getInstance();
+ private BentoBox plugin = BentoBox.getInstance();
private final String id;
/**
diff --git a/src/main/java/us/tastybento/bskyblock/api/flags/clicklisteners/IslandToggleClick.java b/src/main/java/world/bentobox/bbox/api/flags/clicklisteners/IslandToggleClick.java
similarity index 72%
rename from src/main/java/us/tastybento/bskyblock/api/flags/clicklisteners/IslandToggleClick.java
rename to src/main/java/world/bentobox/bbox/api/flags/clicklisteners/IslandToggleClick.java
index d34833153..53b60d13f 100644
--- a/src/main/java/us/tastybento/bskyblock/api/flags/clicklisteners/IslandToggleClick.java
+++ b/src/main/java/world/bentobox/bbox/api/flags/clicklisteners/IslandToggleClick.java
@@ -1,18 +1,18 @@
/*
*/
-package us.tastybento.bskyblock.api.flags.clicklisteners;
+package world.bentobox.bbox.api.flags.clicklisteners;
import org.bukkit.Sound;
import org.bukkit.event.inventory.ClickType;
-import us.tastybento.bskyblock.BSkyBlock;
-import us.tastybento.bskyblock.api.flags.Flag;
-import us.tastybento.bskyblock.api.panels.Panel;
-import us.tastybento.bskyblock.api.panels.PanelItem.ClickHandler;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.database.objects.Island;
-import us.tastybento.bskyblock.util.Util;
+import world.bentobox.bbox.BentoBox;
+import world.bentobox.bbox.api.flags.Flag;
+import world.bentobox.bbox.api.panels.Panel;
+import world.bentobox.bbox.api.panels.PanelItem.ClickHandler;
+import world.bentobox.bbox.api.user.User;
+import world.bentobox.bbox.database.objects.Island;
+import world.bentobox.bbox.util.Util;
/**
* Toggles a island setting on/off
@@ -21,7 +21,7 @@ import us.tastybento.bskyblock.util.Util;
*/
public class IslandToggleClick implements ClickHandler {
- private BSkyBlock plugin = BSkyBlock.getInstance();
+ private BentoBox plugin = BentoBox.getInstance();
private String id;
/**
@@ -31,9 +31,6 @@ public class IslandToggleClick implements ClickHandler {
this.id = id;
}
- /* (non-Javadoc)
- * @see us.tastybento.bskyblock.api.panels.PanelItem.ClickHandler#onClick(us.tastybento.bskyblock.api.panels.Panel, us.tastybento.bskyblock.api.user.User, org.bukkit.event.inventory.ClickType, int)
- */
@Override
public boolean onClick(Panel panel, User user, ClickType clickType, int slot) {
// Get the world
diff --git a/src/main/java/us/tastybento/bskyblock/api/flags/clicklisteners/WorldToggleClick.java b/src/main/java/world/bentobox/bbox/api/flags/clicklisteners/WorldToggleClick.java
similarity index 70%
rename from src/main/java/us/tastybento/bskyblock/api/flags/clicklisteners/WorldToggleClick.java
rename to src/main/java/world/bentobox/bbox/api/flags/clicklisteners/WorldToggleClick.java
index e0b47422e..d12067a15 100644
--- a/src/main/java/us/tastybento/bskyblock/api/flags/clicklisteners/WorldToggleClick.java
+++ b/src/main/java/world/bentobox/bbox/api/flags/clicklisteners/WorldToggleClick.java
@@ -1,17 +1,17 @@
/*
*/
-package us.tastybento.bskyblock.api.flags.clicklisteners;
+package world.bentobox.bbox.api.flags.clicklisteners;
import org.bukkit.Sound;
import org.bukkit.event.inventory.ClickType;
-import us.tastybento.bskyblock.BSkyBlock;
-import us.tastybento.bskyblock.api.flags.Flag;
-import us.tastybento.bskyblock.api.panels.Panel;
-import us.tastybento.bskyblock.api.panels.PanelItem.ClickHandler;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.util.Util;
+import world.bentobox.bbox.BentoBox;
+import world.bentobox.bbox.api.flags.Flag;
+import world.bentobox.bbox.api.panels.Panel;
+import world.bentobox.bbox.api.panels.PanelItem.ClickHandler;
+import world.bentobox.bbox.api.user.User;
+import world.bentobox.bbox.util.Util;
/**
* Toggles a worldwide setting on/off
@@ -20,7 +20,7 @@ import us.tastybento.bskyblock.util.Util;
*/
public class WorldToggleClick implements ClickHandler {
- private BSkyBlock plugin = BSkyBlock.getInstance();
+ private BentoBox plugin = BentoBox.getInstance();
private String id;
/**
@@ -30,10 +30,6 @@ public class WorldToggleClick implements ClickHandler {
this.id = id;
}
-
- /* (non-Javadoc)
- * @see us.tastybento.bskyblock.api.panels.PanelItem.ClickHandler#onClick(us.tastybento.bskyblock.api.panels.Panel, us.tastybento.bskyblock.api.user.User, org.bukkit.event.inventory.ClickType, int)
- */
@Override
public boolean onClick(Panel panel, User user, ClickType clickType, int slot) {
// Get the world
diff --git a/src/main/java/us/tastybento/bskyblock/api/localization/BSBLocale.java b/src/main/java/world/bentobox/bbox/api/localization/BentoBoxLocale.java
similarity index 89%
rename from src/main/java/us/tastybento/bskyblock/api/localization/BSBLocale.java
rename to src/main/java/world/bentobox/bbox/api/localization/BentoBoxLocale.java
index 0dc06fbca..613bb7fa1 100644
--- a/src/main/java/us/tastybento/bskyblock/api/localization/BSBLocale.java
+++ b/src/main/java/world/bentobox/bbox/api/localization/BentoBoxLocale.java
@@ -1,24 +1,22 @@
-package us.tastybento.bskyblock.api.localization;
+package world.bentobox.bbox.api.localization;
-import java.io.File;
import java.util.Locale;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.inventory.ItemStack;
-import us.tastybento.bskyblock.BSkyBlock;
-import us.tastybento.bskyblock.util.ItemParser;
+import world.bentobox.bbox.util.ItemParser;
/**
* @author Poslovitch, tastybento
*/
-public class BSBLocale {
+public class BentoBoxLocale {
private Locale locale;
private YamlConfiguration config;
private ItemStack banner;
- public BSBLocale(Locale locale, YamlConfiguration config) {
+ public BentoBoxLocale(Locale locale, YamlConfiguration config) {
this.locale = locale;
this.config = config;
diff --git a/src/main/java/us/tastybento/bskyblock/api/localization/TextVariables.java b/src/main/java/world/bentobox/bbox/api/localization/TextVariables.java
similarity index 92%
rename from src/main/java/us/tastybento/bskyblock/api/localization/TextVariables.java
rename to src/main/java/world/bentobox/bbox/api/localization/TextVariables.java
index 3f0bcf305..fea96d04c 100644
--- a/src/main/java/us/tastybento/bskyblock/api/localization/TextVariables.java
+++ b/src/main/java/world/bentobox/bbox/api/localization/TextVariables.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.api.localization;
+package world.bentobox.bbox.api.localization;
/**
* Contains the common variables that can be used in texts.
diff --git a/src/main/java/us/tastybento/bskyblock/api/panels/Panel.java b/src/main/java/world/bentobox/bbox/api/panels/Panel.java
similarity index 94%
rename from src/main/java/us/tastybento/bskyblock/api/panels/Panel.java
rename to src/main/java/world/bentobox/bbox/api/panels/Panel.java
index fcb2adde5..bd1846f7d 100644
--- a/src/main/java/us/tastybento/bskyblock/api/panels/Panel.java
+++ b/src/main/java/world/bentobox/bbox/api/panels/Panel.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.api.panels;
+package world.bentobox.bbox.api.panels;
import java.util.Map;
import java.util.Optional;
@@ -10,10 +10,10 @@ import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.listeners.PanelListenerManager;
-import us.tastybento.bskyblock.util.HeadGetter;
-import us.tastybento.bskyblock.util.HeadRequester;
+import world.bentobox.bbox.api.user.User;
+import world.bentobox.bbox.listeners.PanelListenerManager;
+import world.bentobox.bbox.util.HeadGetter;
+import world.bentobox.bbox.util.HeadRequester;
public class Panel implements HeadRequester {
diff --git a/src/main/java/us/tastybento/bskyblock/api/panels/PanelItem.java b/src/main/java/world/bentobox/bbox/api/panels/PanelItem.java
similarity index 95%
rename from src/main/java/us/tastybento/bskyblock/api/panels/PanelItem.java
rename to src/main/java/world/bentobox/bbox/api/panels/PanelItem.java
index df27748ac..e2bceb543 100644
--- a/src/main/java/us/tastybento/bskyblock/api/panels/PanelItem.java
+++ b/src/main/java/world/bentobox/bbox/api/panels/PanelItem.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.api.panels;
+package world.bentobox.bbox.api.panels;
import java.util.List;
import java.util.Optional;
@@ -9,8 +9,8 @@ import org.bukkit.inventory.ItemFlag;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
-import us.tastybento.bskyblock.api.panels.builders.PanelItemBuilder;
-import us.tastybento.bskyblock.api.user.User;
+import world.bentobox.bbox.api.panels.builders.PanelItemBuilder;
+import world.bentobox.bbox.api.user.User;
public class PanelItem {
diff --git a/src/main/java/us/tastybento/bskyblock/api/panels/PanelListener.java b/src/main/java/world/bentobox/bbox/api/panels/PanelListener.java
similarity index 79%
rename from src/main/java/us/tastybento/bskyblock/api/panels/PanelListener.java
rename to src/main/java/world/bentobox/bbox/api/panels/PanelListener.java
index dbc7c5942..b7f4d95e5 100644
--- a/src/main/java/us/tastybento/bskyblock/api/panels/PanelListener.java
+++ b/src/main/java/world/bentobox/bbox/api/panels/PanelListener.java
@@ -1,9 +1,9 @@
-package us.tastybento.bskyblock.api.panels;
+package world.bentobox.bbox.api.panels;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryCloseEvent;
-import us.tastybento.bskyblock.api.user.User;
+import world.bentobox.bbox.api.user.User;
public interface PanelListener {
diff --git a/src/main/java/us/tastybento/bskyblock/api/panels/builders/PanelBuilder.java b/src/main/java/world/bentobox/bbox/api/panels/builders/PanelBuilder.java
similarity index 90%
rename from src/main/java/us/tastybento/bskyblock/api/panels/builders/PanelBuilder.java
rename to src/main/java/world/bentobox/bbox/api/panels/builders/PanelBuilder.java
index 0a49fd3e3..49897a262 100644
--- a/src/main/java/us/tastybento/bskyblock/api/panels/builders/PanelBuilder.java
+++ b/src/main/java/world/bentobox/bbox/api/panels/builders/PanelBuilder.java
@@ -1,11 +1,11 @@
-package us.tastybento.bskyblock.api.panels.builders;
+package world.bentobox.bbox.api.panels.builders;
import java.util.TreeMap;
-import us.tastybento.bskyblock.api.panels.Panel;
-import us.tastybento.bskyblock.api.panels.PanelItem;
-import us.tastybento.bskyblock.api.panels.PanelListener;
-import us.tastybento.bskyblock.api.user.User;
+import world.bentobox.bbox.api.panels.Panel;
+import world.bentobox.bbox.api.panels.PanelItem;
+import world.bentobox.bbox.api.panels.PanelListener;
+import world.bentobox.bbox.api.user.User;
public class PanelBuilder {
private String name;
diff --git a/src/main/java/us/tastybento/bskyblock/api/panels/builders/PanelItemBuilder.java b/src/main/java/world/bentobox/bbox/api/panels/builders/PanelItemBuilder.java
similarity index 91%
rename from src/main/java/us/tastybento/bskyblock/api/panels/builders/PanelItemBuilder.java
rename to src/main/java/world/bentobox/bbox/api/panels/builders/PanelItemBuilder.java
index 54d173f53..03630aed0 100644
--- a/src/main/java/us/tastybento/bskyblock/api/panels/builders/PanelItemBuilder.java
+++ b/src/main/java/world/bentobox/bbox/api/panels/builders/PanelItemBuilder.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.api.panels.builders;
+package world.bentobox.bbox.api.panels.builders;
import java.util.ArrayList;
import java.util.Arrays;
@@ -8,8 +8,8 @@ import java.util.List;
import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;
-import us.tastybento.bskyblock.api.panels.PanelItem;
-import us.tastybento.bskyblock.api.panels.PanelItem.ClickHandler;
+import world.bentobox.bbox.api.panels.PanelItem;
+import world.bentobox.bbox.api.panels.PanelItem.ClickHandler;
public class PanelItemBuilder {
private ItemStack icon = new ItemStack(Material.AIR);
@@ -35,7 +35,7 @@ public class PanelItemBuilder {
* @return PanelItemBuilder
*/
public PanelItemBuilder icon(String playerName) {
- this.icon = new ItemStack(Material.SKULL_ITEM, 1, (short) 3);
+ this.icon = new ItemStack(Material.SKULL_ITEM, 1);
this.name = playerName;
this.playerHead = true;
return this;
diff --git a/src/main/java/us/tastybento/bskyblock/api/placeholders/Placeholder.java b/src/main/java/world/bentobox/bbox/api/placeholders/Placeholder.java
similarity index 84%
rename from src/main/java/us/tastybento/bskyblock/api/placeholders/Placeholder.java
rename to src/main/java/world/bentobox/bbox/api/placeholders/Placeholder.java
index fc4adddf4..a9ebde73a 100644
--- a/src/main/java/us/tastybento/bskyblock/api/placeholders/Placeholder.java
+++ b/src/main/java/world/bentobox/bbox/api/placeholders/Placeholder.java
@@ -1,6 +1,6 @@
-package us.tastybento.bskyblock.api.placeholders;
+package world.bentobox.bbox.api.placeholders;
-import us.tastybento.bskyblock.api.user.User;
+import world.bentobox.bbox.api.user.User;
/**
* @author Poslovitch
diff --git a/src/main/java/us/tastybento/bskyblock/api/placeholders/PlaceholderAPIInterface.java b/src/main/java/world/bentobox/bbox/api/placeholders/PlaceholderAPIInterface.java
similarity index 78%
rename from src/main/java/us/tastybento/bskyblock/api/placeholders/PlaceholderAPIInterface.java
rename to src/main/java/world/bentobox/bbox/api/placeholders/PlaceholderAPIInterface.java
index 1bc6f10be..8de94bf7d 100644
--- a/src/main/java/us/tastybento/bskyblock/api/placeholders/PlaceholderAPIInterface.java
+++ b/src/main/java/world/bentobox/bbox/api/placeholders/PlaceholderAPIInterface.java
@@ -1,7 +1,7 @@
-package us.tastybento.bskyblock.api.placeholders;
+package world.bentobox.bbox.api.placeholders;
-import us.tastybento.bskyblock.BSkyBlock;
-import us.tastybento.bskyblock.api.user.User;
+import world.bentobox.bbox.BentoBox;
+import world.bentobox.bbox.api.user.User;
/**
* Simple interface for every Placeholder API.
@@ -21,13 +21,13 @@ public interface PlaceholderAPIInterface {
* @param plugin - BSkyBlock plugin object
* @return true if successfully registered
*/
- boolean register(BSkyBlock plugin);
+ boolean register(BentoBox plugin);
/**
* Unregisters the placeholder API
* @param plugin - BSkyBlock plugin object
*/
- void unregister(BSkyBlock plugin);
+ void unregister(BentoBox plugin);
/**
* Replace placeholders in the message according to the receiver
diff --git a/src/main/java/us/tastybento/bskyblock/api/placeholders/PlaceholderBuilder.java b/src/main/java/world/bentobox/bbox/api/placeholders/PlaceholderBuilder.java
similarity index 92%
rename from src/main/java/us/tastybento/bskyblock/api/placeholders/PlaceholderBuilder.java
rename to src/main/java/world/bentobox/bbox/api/placeholders/PlaceholderBuilder.java
index f6ca9f36b..49cc38a3a 100644
--- a/src/main/java/us/tastybento/bskyblock/api/placeholders/PlaceholderBuilder.java
+++ b/src/main/java/world/bentobox/bbox/api/placeholders/PlaceholderBuilder.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.api.placeholders;
+package world.bentobox.bbox.api.placeholders;
public class PlaceholderBuilder {
diff --git a/src/main/java/us/tastybento/bskyblock/api/placeholders/PlaceholderHandler.java b/src/main/java/world/bentobox/bbox/api/placeholders/PlaceholderHandler.java
similarity index 89%
rename from src/main/java/us/tastybento/bskyblock/api/placeholders/PlaceholderHandler.java
rename to src/main/java/world/bentobox/bbox/api/placeholders/PlaceholderHandler.java
index f69ba83f2..195a673db 100644
--- a/src/main/java/us/tastybento/bskyblock/api/placeholders/PlaceholderHandler.java
+++ b/src/main/java/world/bentobox/bbox/api/placeholders/PlaceholderHandler.java
@@ -1,11 +1,11 @@
-package us.tastybento.bskyblock.api.placeholders;
+package world.bentobox.bbox.api.placeholders;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
-import us.tastybento.bskyblock.BSkyBlock;
-import us.tastybento.bskyblock.api.user.User;
+import world.bentobox.bbox.BentoBox;
+import world.bentobox.bbox.api.user.User;
/**
* Handles hooks with other Placeholder APIs.
@@ -13,11 +13,11 @@ import us.tastybento.bskyblock.api.user.User;
* @author Poslovitch, Tastybento
*/
public class PlaceholderHandler {
- private static final String PACKAGE = "us.tastybento.bskyblock.api.placeholders.hooks.";
-
+ private static final String PACKAGE = "world.bentobox.bbox.api.placeholders.hooks.";
+
// This class should never be instantiated (all methods are static)
private PlaceholderHandler() {}
-
+
/**
* List of API classes in the package specified above (except the Internal one)
*/
@@ -31,7 +31,7 @@ public class PlaceholderHandler {
* Register placeholders and hooks
* @param plugin - BSkyBlock plugin object
*/
- public static void register(BSkyBlock plugin){
+ public static void register(BentoBox plugin){
// Load Internal Placeholder API
try{
@@ -66,7 +66,7 @@ public class PlaceholderHandler {
* Unregister placeholder hooks
* @param plugin - BSkyBlock plugin object
*/
- public static void unregister(BSkyBlock plugin){
+ public static void unregister(BentoBox plugin){
Iterator it = apis.iterator();
while (it.hasNext()) {
PlaceholderAPIInterface api = it.next();
diff --git a/src/main/java/us/tastybento/bskyblock/api/placeholders/hooks/InternalPlaceholderImpl.java b/src/main/java/world/bentobox/bbox/api/placeholders/hooks/InternalPlaceholderImpl.java
similarity index 64%
rename from src/main/java/us/tastybento/bskyblock/api/placeholders/hooks/InternalPlaceholderImpl.java
rename to src/main/java/world/bentobox/bbox/api/placeholders/hooks/InternalPlaceholderImpl.java
index f8afcadd9..32d91828f 100644
--- a/src/main/java/us/tastybento/bskyblock/api/placeholders/hooks/InternalPlaceholderImpl.java
+++ b/src/main/java/world/bentobox/bbox/api/placeholders/hooks/InternalPlaceholderImpl.java
@@ -1,10 +1,10 @@
-package us.tastybento.bskyblock.api.placeholders.hooks;
+package world.bentobox.bbox.api.placeholders.hooks;
-import us.tastybento.bskyblock.BSkyBlock;
-import us.tastybento.bskyblock.api.placeholders.Placeholder;
-import us.tastybento.bskyblock.api.placeholders.PlaceholderAPIInterface;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.lists.Placeholders;
+import world.bentobox.bbox.BentoBox;
+import world.bentobox.bbox.api.placeholders.Placeholder;
+import world.bentobox.bbox.api.placeholders.PlaceholderAPIInterface;
+import world.bentobox.bbox.api.user.User;
+import world.bentobox.bbox.lists.Placeholders;
/**
* Built-in placeholder API
@@ -19,12 +19,12 @@ public class InternalPlaceholderImpl implements PlaceholderAPIInterface {
}
@Override
- public boolean register(BSkyBlock plugin) {
+ public boolean register(BentoBox plugin) {
return true;
}
@Override
- public void unregister(BSkyBlock plugin) {
+ public void unregister(BentoBox plugin) {
// Useless : it would disable the placeholders.
}
diff --git a/src/main/java/us/tastybento/bskyblock/api/user/Notifier.java b/src/main/java/world/bentobox/bbox/api/user/Notifier.java
similarity index 98%
rename from src/main/java/us/tastybento/bskyblock/api/user/Notifier.java
rename to src/main/java/world/bentobox/bbox/api/user/Notifier.java
index 72094891a..20879bb96 100644
--- a/src/main/java/us/tastybento/bskyblock/api/user/Notifier.java
+++ b/src/main/java/world/bentobox/bbox/api/user/Notifier.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.api.user;
+package world.bentobox.bbox.api.user;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
diff --git a/src/main/java/us/tastybento/bskyblock/api/user/User.java b/src/main/java/world/bentobox/bbox/api/user/User.java
similarity index 97%
rename from src/main/java/us/tastybento/bskyblock/api/user/User.java
rename to src/main/java/world/bentobox/bbox/api/user/User.java
index e7acff6da..614db14ef 100644
--- a/src/main/java/us/tastybento/bskyblock/api/user/User.java
+++ b/src/main/java/world/bentobox/bbox/api/user/User.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.api.user;
+package world.bentobox.bbox.api.user;
import java.util.HashMap;
import java.util.Locale;
@@ -17,8 +17,8 @@ import org.bukkit.entity.Player;
import org.bukkit.inventory.PlayerInventory;
import org.bukkit.permissions.PermissionAttachmentInfo;
-import us.tastybento.bskyblock.BSkyBlock;
-import us.tastybento.bskyblock.api.placeholders.PlaceholderHandler;
+import world.bentobox.bbox.BentoBox;
+import world.bentobox.bbox.api.placeholders.PlaceholderHandler;
/**
* BSB's user object. Wraps Player.
@@ -87,7 +87,7 @@ public class User {
// ----------------------------------------------------
- private static BSkyBlock plugin = BSkyBlock.getInstance();
+ private static BentoBox plugin = BentoBox.getInstance();
private Player player;
private final UUID playerUUID;
@@ -116,7 +116,7 @@ public class User {
* Used for testing
* @param p - BSkyBlock plugin
*/
- public static void setPlugin(BSkyBlock p) {
+ public static void setPlugin(BentoBox p) {
plugin = p;
}
diff --git a/src/main/java/us/tastybento/bskyblock/commands/admin/AdminClearResetsAllCommand.java b/src/main/java/world/bentobox/bbox/commands/admin/AdminClearResetsAllCommand.java
similarity index 87%
rename from src/main/java/us/tastybento/bskyblock/commands/admin/AdminClearResetsAllCommand.java
rename to src/main/java/world/bentobox/bbox/commands/admin/AdminClearResetsAllCommand.java
index 05efa4fdb..d59bb20a2 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/admin/AdminClearResetsAllCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/admin/AdminClearResetsAllCommand.java
@@ -1,12 +1,12 @@
-package us.tastybento.bskyblock.commands.admin;
+package world.bentobox.bbox.commands.admin;
import java.util.List;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.user.User;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.user.User;
public class AdminClearResetsAllCommand extends CompositeCommand {
diff --git a/src/main/java/us/tastybento/bskyblock/commands/admin/AdminClearResetsCommand.java b/src/main/java/world/bentobox/bbox/commands/admin/AdminClearResetsCommand.java
similarity index 90%
rename from src/main/java/us/tastybento/bskyblock/commands/admin/AdminClearResetsCommand.java
rename to src/main/java/world/bentobox/bbox/commands/admin/AdminClearResetsCommand.java
index 7fc7bf3f5..9bc4cd0c6 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/admin/AdminClearResetsCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/admin/AdminClearResetsCommand.java
@@ -1,13 +1,13 @@
-package us.tastybento.bskyblock.commands.admin;
+package world.bentobox.bbox.commands.admin;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.UUID;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.util.Util;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.user.User;
+import world.bentobox.bbox.util.Util;
public class AdminClearResetsCommand extends CompositeCommand {
diff --git a/src/main/java/us/tastybento/bskyblock/commands/admin/AdminGetRankCommand.java b/src/main/java/world/bentobox/bbox/commands/admin/AdminGetRankCommand.java
similarity index 75%
rename from src/main/java/us/tastybento/bskyblock/commands/admin/AdminGetRankCommand.java
rename to src/main/java/world/bentobox/bbox/commands/admin/AdminGetRankCommand.java
index ab38bf879..6af82163a 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/admin/AdminGetRankCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/admin/AdminGetRankCommand.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.commands.admin;
+package world.bentobox.bbox.commands.admin;
import java.util.List;
import java.util.Optional;
@@ -8,11 +8,11 @@ import java.util.stream.Collectors;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.localization.TextVariables;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.database.objects.Island;
-import us.tastybento.bskyblock.managers.RanksManager;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.localization.TextVariables;
+import world.bentobox.bbox.api.user.User;
+import world.bentobox.bbox.database.objects.Island;
+import world.bentobox.bbox.managers.RanksManager;
/**
* @author tastybento
@@ -24,9 +24,6 @@ public class AdminGetRankCommand extends CompositeCommand {
super(adminCommand, "getrank");
}
- /* (non-Javadoc)
- * @see us.tastybento.bskyblock.api.commands.BSBCommand#setup()
- */
@Override
public void setup() {
setPermission("admin.setrank");
@@ -35,16 +32,13 @@ public class AdminGetRankCommand extends CompositeCommand {
setDescription("commands.admin.getrank.description");
}
- /* (non-Javadoc)
- * @see us.tastybento.bskyblock.api.commands.BSBCommand#execute(us.tastybento.bskyblock.api.user.User, java.util.List)
- */
@Override
public boolean execute(User user, String label, List args) {
if (args.size() != 1) {
// Show help
showHelp(this, user);
return false;
- }
+ }
// Get target player
UUID targetUUID = getPlayers().getUUID(args.get(0));
if (targetUUID == null) {
diff --git a/src/main/java/us/tastybento/bskyblock/commands/admin/AdminInfoCommand.java b/src/main/java/world/bentobox/bbox/commands/admin/AdminInfoCommand.java
similarity index 91%
rename from src/main/java/us/tastybento/bskyblock/commands/admin/AdminInfoCommand.java
rename to src/main/java/world/bentobox/bbox/commands/admin/AdminInfoCommand.java
index 991391a11..da2dc4f82 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/admin/AdminInfoCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/admin/AdminInfoCommand.java
@@ -1,10 +1,10 @@
-package us.tastybento.bskyblock.commands.admin;
+package world.bentobox.bbox.commands.admin;
import java.util.List;
import java.util.UUID;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.user.User;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.user.User;
public class AdminInfoCommand extends CompositeCommand {
diff --git a/src/main/java/us/tastybento/bskyblock/commands/admin/AdminRegisterCommand.java b/src/main/java/world/bentobox/bbox/commands/admin/AdminRegisterCommand.java
similarity index 94%
rename from src/main/java/us/tastybento/bskyblock/commands/admin/AdminRegisterCommand.java
rename to src/main/java/world/bentobox/bbox/commands/admin/AdminRegisterCommand.java
index 356dd7056..cb248f066 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/admin/AdminRegisterCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/admin/AdminRegisterCommand.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.commands.admin;
+package world.bentobox.bbox.commands.admin;
import java.util.ArrayList;
import java.util.List;
@@ -8,10 +8,10 @@ import java.util.UUID;
import org.bukkit.Location;
import org.bukkit.Material;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.database.objects.Island;
-import us.tastybento.bskyblock.util.Util;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.user.User;
+import world.bentobox.bbox.database.objects.Island;
+import world.bentobox.bbox.util.Util;
public class AdminRegisterCommand extends CompositeCommand {
diff --git a/src/main/java/us/tastybento/bskyblock/commands/admin/AdminReloadCommand.java b/src/main/java/world/bentobox/bbox/commands/admin/AdminReloadCommand.java
similarity index 55%
rename from src/main/java/us/tastybento/bskyblock/commands/admin/AdminReloadCommand.java
rename to src/main/java/world/bentobox/bbox/commands/admin/AdminReloadCommand.java
index b95837c2a..bba63004f 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/admin/AdminReloadCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/admin/AdminReloadCommand.java
@@ -1,9 +1,9 @@
-package us.tastybento.bskyblock.commands.admin;
+package world.bentobox.bbox.commands.admin;
import java.util.List;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.user.User;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.user.User;
/**
* @author tastybento
@@ -18,17 +18,11 @@ public class AdminReloadCommand extends CompositeCommand {
super(parent, "reload", "rl");
}
- /* (non-Javadoc)
- * @see us.tastybento.bskyblock.api.commands.BSBCommand#setup()
- */
@Override
public void setup() {
setDescription("commands.admin.reload.description");
}
- /* (non-Javadoc)
- * @see us.tastybento.bskyblock.api.commands.BSBCommand#execute(us.tastybento.bskyblock.api.user.User, java.util.List)
- */
@Override
public boolean execute(User user, String label, List args) {
return true;
diff --git a/src/main/java/us/tastybento/bskyblock/commands/admin/AdminSchemCommand.java b/src/main/java/world/bentobox/bbox/commands/admin/AdminSchemCommand.java
similarity index 95%
rename from src/main/java/us/tastybento/bskyblock/commands/admin/AdminSchemCommand.java
rename to src/main/java/world/bentobox/bbox/commands/admin/AdminSchemCommand.java
index e77d13ca3..b7b8bbd1c 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/admin/AdminSchemCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/admin/AdminSchemCommand.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.commands.admin;
+package world.bentobox.bbox.commands.admin;
import java.io.File;
import java.util.HashMap;
@@ -10,10 +10,10 @@ import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.block.Block;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.island.builders.Clipboard;
-import us.tastybento.bskyblock.util.Util;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.user.User;
+import world.bentobox.bbox.island.builders.Clipboard;
+import world.bentobox.bbox.util.Util;
public class AdminSchemCommand extends CompositeCommand {
private Map clipboards;
diff --git a/src/main/java/us/tastybento/bskyblock/commands/admin/AdminSetRankCommand.java b/src/main/java/world/bentobox/bbox/commands/admin/AdminSetRankCommand.java
similarity index 80%
rename from src/main/java/us/tastybento/bskyblock/commands/admin/AdminSetRankCommand.java
rename to src/main/java/world/bentobox/bbox/commands/admin/AdminSetRankCommand.java
index 0ec49b4f9..bf7dbbfba 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/admin/AdminSetRankCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/admin/AdminSetRankCommand.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.commands.admin;
+package world.bentobox.bbox.commands.admin;
import java.util.List;
import java.util.Map;
@@ -6,10 +6,10 @@ import java.util.Optional;
import java.util.UUID;
import java.util.stream.Collectors;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.database.objects.Island;
-import us.tastybento.bskyblock.managers.RanksManager;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.user.User;
+import world.bentobox.bbox.database.objects.Island;
+import world.bentobox.bbox.managers.RanksManager;
/**
* @author tastybento
@@ -21,9 +21,6 @@ public class AdminSetRankCommand extends CompositeCommand {
super(adminCommand, "setrank");
}
- /* (non-Javadoc)
- * @see us.tastybento.bskyblock.api.commands.BSBCommand#setup()
- */
@Override
public void setup() {
setPermission("admin.setrank");
@@ -32,16 +29,13 @@ public class AdminSetRankCommand extends CompositeCommand {
setDescription("commands.admin.setrank.description");
}
- /* (non-Javadoc)
- * @see us.tastybento.bskyblock.api.commands.BSBCommand#execute(us.tastybento.bskyblock.api.user.User, java.util.List)
- */
@Override
public boolean execute(User user, String label, List args) {
if (args.size() != 2) {
// Show help
showHelp(this, user);
return false;
- }
+ }
// Get target player
UUID targetUUID = getPlayers().getUUID(args.get(0));
if (targetUUID == null) {
@@ -62,8 +56,8 @@ public class AdminSetRankCommand extends CompositeCommand {
return false;
}
User target = User.getInstance(targetUUID);
-
- Island island = getPlugin().getIslands().getIsland(getWorld(), targetUUID);
+
+ Island island = getPlugin().getIslands().getIsland(getWorld(), targetUUID);
int currentRank = island.getRank(target);
island.setRank(target, rankValue);
user.sendMessage("commands.admin.setrank.rank-set", "[from]", user.getTranslation(rm.getRank(currentRank)), "[to]", user.getTranslation(rm.getRank(rankValue)));
diff --git a/src/main/java/us/tastybento/bskyblock/commands/admin/AdminTeleportCommand.java b/src/main/java/world/bentobox/bbox/commands/admin/AdminTeleportCommand.java
similarity index 91%
rename from src/main/java/us/tastybento/bskyblock/commands/admin/AdminTeleportCommand.java
rename to src/main/java/world/bentobox/bbox/commands/admin/AdminTeleportCommand.java
index 144c8bb0c..7d619e9b0 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/admin/AdminTeleportCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/admin/AdminTeleportCommand.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.commands.admin;
+package world.bentobox.bbox.commands.admin;
import java.util.ArrayList;
import java.util.List;
@@ -7,10 +7,10 @@ import java.util.UUID;
import org.bukkit.Location;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.util.Util;
-import us.tastybento.bskyblock.util.teleport.SafeTeleportBuilder;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.user.User;
+import world.bentobox.bbox.util.Util;
+import world.bentobox.bbox.util.teleport.SafeTeleportBuilder;
public class AdminTeleportCommand extends CompositeCommand {
diff --git a/src/main/java/us/tastybento/bskyblock/commands/admin/AdminUnregisterCommand.java b/src/main/java/world/bentobox/bbox/commands/admin/AdminUnregisterCommand.java
similarity index 91%
rename from src/main/java/us/tastybento/bskyblock/commands/admin/AdminUnregisterCommand.java
rename to src/main/java/world/bentobox/bbox/commands/admin/AdminUnregisterCommand.java
index 190a24424..619a73e27 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/admin/AdminUnregisterCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/admin/AdminUnregisterCommand.java
@@ -1,13 +1,13 @@
-package us.tastybento.bskyblock.commands.admin;
+package world.bentobox.bbox.commands.admin;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.UUID;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.util.Util;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.user.User;
+import world.bentobox.bbox.util.Util;
public class AdminUnregisterCommand extends CompositeCommand {
diff --git a/src/main/java/us/tastybento/bskyblock/commands/admin/AdminVersionCommand.java b/src/main/java/world/bentobox/bbox/commands/admin/AdminVersionCommand.java
similarity index 75%
rename from src/main/java/us/tastybento/bskyblock/commands/admin/AdminVersionCommand.java
rename to src/main/java/world/bentobox/bbox/commands/admin/AdminVersionCommand.java
index 0cdd3f3a6..11b16a088 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/admin/AdminVersionCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/admin/AdminVersionCommand.java
@@ -1,9 +1,9 @@
-package us.tastybento.bskyblock.commands.admin;
+package world.bentobox.bbox.commands.admin;
import java.util.List;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.user.User;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.user.User;
public class AdminVersionCommand extends CompositeCommand {
diff --git a/src/main/java/us/tastybento/bskyblock/commands/admin/range/AdminRangeCommand.java b/src/main/java/world/bentobox/bbox/commands/admin/range/AdminRangeCommand.java
similarity index 79%
rename from src/main/java/us/tastybento/bskyblock/commands/admin/range/AdminRangeCommand.java
rename to src/main/java/world/bentobox/bbox/commands/admin/range/AdminRangeCommand.java
index 89a083b20..1379d3e0e 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/admin/range/AdminRangeCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/admin/range/AdminRangeCommand.java
@@ -1,9 +1,9 @@
-package us.tastybento.bskyblock.commands.admin.range;
+package world.bentobox.bbox.commands.admin.range;
import java.util.List;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.user.User;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.user.User;
/**
* @author Poslovitch
diff --git a/src/main/java/us/tastybento/bskyblock/commands/admin/range/AdminRangeDisplayCommand.java b/src/main/java/world/bentobox/bbox/commands/admin/range/AdminRangeDisplayCommand.java
similarity index 93%
rename from src/main/java/us/tastybento/bskyblock/commands/admin/range/AdminRangeDisplayCommand.java
rename to src/main/java/world/bentobox/bbox/commands/admin/range/AdminRangeDisplayCommand.java
index 6cf8c5fc6..64f60ffad 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/admin/range/AdminRangeDisplayCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/admin/range/AdminRangeDisplayCommand.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.commands.admin.range;
+package world.bentobox.bbox.commands.admin.range;
import java.util.HashMap;
import java.util.List;
@@ -10,8 +10,8 @@ import org.bukkit.Particle;
import org.bukkit.entity.Player;
import org.bukkit.util.Vector;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.user.User;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.user.User;
/**
* @author Poslovitch
@@ -76,8 +76,8 @@ public class AdminRangeDisplayCommand extends CompositeCommand {
drawZone(user.getPlayer(), Particle.BARRIER, island.getCenter(), island.getProtectionRange());
// Draw the default protected area if island protected zone is different
- if (island.getProtectionRange() != getPlugin().getSettings().getIslandProtectionRange()) {
- drawZone(user.getPlayer(), Particle.VILLAGER_HAPPY, island.getCenter(), getPlugin().getSettings().getIslandProtectionRange());
+ if (island.getProtectionRange() != getPlugin().getIWM().getIslandProtectionRange(getWorld())) {
+ drawZone(user.getPlayer(), Particle.VILLAGER_HAPPY, island.getCenter(), getPlugin().getIWM().getIslandProtectionRange(getWorld()));
}
// Draw the island area
diff --git a/src/main/java/us/tastybento/bskyblock/commands/admin/range/AdminRangeResetCommand.java b/src/main/java/world/bentobox/bbox/commands/admin/range/AdminRangeResetCommand.java
similarity index 83%
rename from src/main/java/us/tastybento/bskyblock/commands/admin/range/AdminRangeResetCommand.java
rename to src/main/java/world/bentobox/bbox/commands/admin/range/AdminRangeResetCommand.java
index 6046d283e..24204c0bf 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/admin/range/AdminRangeResetCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/admin/range/AdminRangeResetCommand.java
@@ -1,12 +1,12 @@
-package us.tastybento.bskyblock.commands.admin.range;
+package world.bentobox.bbox.commands.admin.range;
import java.util.List;
import java.util.UUID;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.localization.TextVariables;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.database.objects.Island;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.localization.TextVariables;
+import world.bentobox.bbox.api.user.User;
+import world.bentobox.bbox.database.objects.Island;
public class AdminRangeResetCommand extends CompositeCommand {
diff --git a/src/main/java/us/tastybento/bskyblock/commands/admin/range/AdminRangeSetCommand.java b/src/main/java/world/bentobox/bbox/commands/admin/range/AdminRangeSetCommand.java
similarity index 89%
rename from src/main/java/us/tastybento/bskyblock/commands/admin/range/AdminRangeSetCommand.java
rename to src/main/java/world/bentobox/bbox/commands/admin/range/AdminRangeSetCommand.java
index 3c9ec6773..38f0531f0 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/admin/range/AdminRangeSetCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/admin/range/AdminRangeSetCommand.java
@@ -1,14 +1,14 @@
-package us.tastybento.bskyblock.commands.admin.range;
+package world.bentobox.bbox.commands.admin.range;
import java.util.List;
import java.util.UUID;
import org.apache.commons.lang.StringUtils;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.localization.TextVariables;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.database.objects.Island;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.localization.TextVariables;
+import world.bentobox.bbox.api.user.User;
+import world.bentobox.bbox.database.objects.Island;
public class AdminRangeSetCommand extends CompositeCommand {
diff --git a/src/main/java/us/tastybento/bskyblock/commands/admin/team/AdminTeamAddCommand.java b/src/main/java/world/bentobox/bbox/commands/admin/team/AdminTeamAddCommand.java
similarity index 92%
rename from src/main/java/us/tastybento/bskyblock/commands/admin/team/AdminTeamAddCommand.java
rename to src/main/java/world/bentobox/bbox/commands/admin/team/AdminTeamAddCommand.java
index a504b179a..7989ad516 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/admin/team/AdminTeamAddCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/admin/team/AdminTeamAddCommand.java
@@ -1,11 +1,11 @@
-package us.tastybento.bskyblock.commands.admin.team;
+package world.bentobox.bbox.commands.admin.team;
import java.util.List;
import java.util.UUID;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.localization.TextVariables;
-import us.tastybento.bskyblock.api.user.User;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.localization.TextVariables;
+import world.bentobox.bbox.api.user.User;
public class AdminTeamAddCommand extends CompositeCommand {
diff --git a/src/main/java/us/tastybento/bskyblock/commands/admin/team/AdminTeamDisbandCommand.java b/src/main/java/world/bentobox/bbox/commands/admin/team/AdminTeamDisbandCommand.java
similarity index 92%
rename from src/main/java/us/tastybento/bskyblock/commands/admin/team/AdminTeamDisbandCommand.java
rename to src/main/java/world/bentobox/bbox/commands/admin/team/AdminTeamDisbandCommand.java
index 4c8bd4ed4..9a35e3895 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/admin/team/AdminTeamDisbandCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/admin/team/AdminTeamDisbandCommand.java
@@ -1,10 +1,10 @@
-package us.tastybento.bskyblock.commands.admin.team;
+package world.bentobox.bbox.commands.admin.team;
import java.util.List;
import java.util.UUID;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.user.User;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.user.User;
public class AdminTeamDisbandCommand extends CompositeCommand {
diff --git a/src/main/java/us/tastybento/bskyblock/commands/admin/team/AdminTeamKickCommand.java b/src/main/java/world/bentobox/bbox/commands/admin/team/AdminTeamKickCommand.java
similarity index 91%
rename from src/main/java/us/tastybento/bskyblock/commands/admin/team/AdminTeamKickCommand.java
rename to src/main/java/world/bentobox/bbox/commands/admin/team/AdminTeamKickCommand.java
index 040f2c5e6..2eabbd9b0 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/admin/team/AdminTeamKickCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/admin/team/AdminTeamKickCommand.java
@@ -1,10 +1,10 @@
-package us.tastybento.bskyblock.commands.admin.team;
+package world.bentobox.bbox.commands.admin.team;
import java.util.List;
import java.util.UUID;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.user.User;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.user.User;
public class AdminTeamKickCommand extends CompositeCommand {
diff --git a/src/main/java/us/tastybento/bskyblock/commands/admin/team/AdminTeamMakeLeaderCommand.java b/src/main/java/world/bentobox/bbox/commands/admin/team/AdminTeamMakeLeaderCommand.java
similarity index 90%
rename from src/main/java/us/tastybento/bskyblock/commands/admin/team/AdminTeamMakeLeaderCommand.java
rename to src/main/java/world/bentobox/bbox/commands/admin/team/AdminTeamMakeLeaderCommand.java
index 77733a10f..4e743f195 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/admin/team/AdminTeamMakeLeaderCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/admin/team/AdminTeamMakeLeaderCommand.java
@@ -1,10 +1,10 @@
-package us.tastybento.bskyblock.commands.admin.team;
+package world.bentobox.bbox.commands.admin.team;
import java.util.List;
import java.util.UUID;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.user.User;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.user.User;
public class AdminTeamMakeLeaderCommand extends CompositeCommand {
diff --git a/src/main/java/us/tastybento/bskyblock/commands/island/CustomIslandMultiHomeHelp.java b/src/main/java/world/bentobox/bbox/commands/island/CustomIslandMultiHomeHelp.java
similarity index 90%
rename from src/main/java/us/tastybento/bskyblock/commands/island/CustomIslandMultiHomeHelp.java
rename to src/main/java/world/bentobox/bbox/commands/island/CustomIslandMultiHomeHelp.java
index 2eedd9624..75d3b0985 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/island/CustomIslandMultiHomeHelp.java
+++ b/src/main/java/world/bentobox/bbox/commands/island/CustomIslandMultiHomeHelp.java
@@ -1,10 +1,10 @@
-package us.tastybento.bskyblock.commands.island;
+package world.bentobox.bbox.commands.island;
import java.util.List;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.util.Util;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.user.User;
+import world.bentobox.bbox.util.Util;
/**
* This is a custom help for the /island go and /island sethome commands. It overrides the default help sub command.
diff --git a/src/main/java/us/tastybento/bskyblock/commands/island/IslandAboutCommand.java b/src/main/java/world/bentobox/bbox/commands/island/IslandAboutCommand.java
similarity index 87%
rename from src/main/java/us/tastybento/bskyblock/commands/island/IslandAboutCommand.java
rename to src/main/java/world/bentobox/bbox/commands/island/IslandAboutCommand.java
index 11267166e..45ece6332 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/island/IslandAboutCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/island/IslandAboutCommand.java
@@ -1,10 +1,10 @@
-package us.tastybento.bskyblock.commands.island;
+package world.bentobox.bbox.commands.island;
import java.util.List;
-import us.tastybento.bskyblock.BSkyBlock;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.user.User;
+import world.bentobox.bbox.BentoBox;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.user.User;
public class IslandAboutCommand extends CompositeCommand {
@@ -23,7 +23,7 @@ public class IslandAboutCommand extends CompositeCommand {
@Override
public boolean execute(User user, String label, List args) {
- user.sendRawMessage("About " + BSkyBlock.getInstance().getDescription().getName() + " v" + BSkyBlock.getInstance().getDescription().getVersion() + ":");
+ user.sendRawMessage("About " + BentoBox.getInstance().getDescription().getName() + " v" + BentoBox.getInstance().getDescription().getVersion() + ":");
user.sendRawMessage("Copyright (c) 2017 - 2018 Tastybento, Poslovitch");
user.sendRawMessage("All rights reserved.");
user.sendRawMessage("");
diff --git a/src/main/java/us/tastybento/bskyblock/commands/island/IslandBanCommand.java b/src/main/java/world/bentobox/bbox/commands/island/IslandBanCommand.java
similarity index 92%
rename from src/main/java/us/tastybento/bskyblock/commands/island/IslandBanCommand.java
rename to src/main/java/world/bentobox/bbox/commands/island/IslandBanCommand.java
index 2618a6c8b..721549c07 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/island/IslandBanCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/island/IslandBanCommand.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.commands.island;
+package world.bentobox.bbox.commands.island;
import java.util.List;
import java.util.Optional;
@@ -9,11 +9,11 @@ import org.bukkit.Bukkit;
import org.bukkit.Sound;
import org.bukkit.entity.Player;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.localization.TextVariables;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.database.objects.Island;
-import us.tastybento.bskyblock.util.Util;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.localization.TextVariables;
+import world.bentobox.bbox.api.user.User;
+import world.bentobox.bbox.database.objects.Island;
+import world.bentobox.bbox.util.Util;
public class IslandBanCommand extends CompositeCommand {
diff --git a/src/main/java/us/tastybento/bskyblock/commands/island/IslandBanlistCommand.java b/src/main/java/world/bentobox/bbox/commands/island/IslandBanlistCommand.java
similarity index 91%
rename from src/main/java/us/tastybento/bskyblock/commands/island/IslandBanlistCommand.java
rename to src/main/java/world/bentobox/bbox/commands/island/IslandBanlistCommand.java
index 42454d315..656866a74 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/island/IslandBanlistCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/island/IslandBanlistCommand.java
@@ -1,12 +1,12 @@
-package us.tastybento.bskyblock.commands.island;
+package world.bentobox.bbox.commands.island;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.database.objects.Island;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.user.User;
+import world.bentobox.bbox.database.objects.Island;
public class IslandBanlistCommand extends CompositeCommand {
diff --git a/src/main/java/us/tastybento/bskyblock/commands/island/IslandCreateCommand.java b/src/main/java/world/bentobox/bbox/commands/island/IslandCreateCommand.java
similarity index 77%
rename from src/main/java/us/tastybento/bskyblock/commands/island/IslandCreateCommand.java
rename to src/main/java/world/bentobox/bbox/commands/island/IslandCreateCommand.java
index e4f58d7d0..1e08a82a6 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/island/IslandCreateCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/island/IslandCreateCommand.java
@@ -1,12 +1,12 @@
-package us.tastybento.bskyblock.commands.island;
+package world.bentobox.bbox.commands.island;
import java.io.IOException;
import java.util.List;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.events.island.IslandEvent.Reason;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.managers.island.NewIsland;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.events.island.IslandEvent.Reason;
+import world.bentobox.bbox.api.user.User;
+import world.bentobox.bbox.managers.island.NewIsland;
/**
* /island create - Create an island.
@@ -30,9 +30,6 @@ public class IslandCreateCommand extends CompositeCommand {
setDescription("commands.island.create.description");
}
- /* (non-Javadoc)
- * @see us.tastybento.bskyblock.api.commands.CommandArgument#execute(org.bukkit.command.CommandSender, java.lang.String[])
- */
@Override
public boolean execute(User user, String label, List args) {
if (getIslands().hasIsland(getWorld(), user.getUniqueId())) {
diff --git a/src/main/java/us/tastybento/bskyblock/commands/island/IslandGoCommand.java b/src/main/java/world/bentobox/bbox/commands/island/IslandGoCommand.java
similarity index 72%
rename from src/main/java/us/tastybento/bskyblock/commands/island/IslandGoCommand.java
rename to src/main/java/world/bentobox/bbox/commands/island/IslandGoCommand.java
index c71e243b9..08520a8b6 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/island/IslandGoCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/island/IslandGoCommand.java
@@ -1,13 +1,13 @@
-package us.tastybento.bskyblock.commands.island;
+package world.bentobox.bbox.commands.island;
import java.util.List;
import org.apache.commons.lang.math.NumberUtils;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.localization.TextVariables;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.util.Util;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.localization.TextVariables;
+import world.bentobox.bbox.api.user.User;
+import world.bentobox.bbox.util.Util;
/**
* @author tastybento
@@ -18,9 +18,6 @@ public class IslandGoCommand extends CompositeCommand {
super(islandCommand, "go", "home", "h");
}
- /* (non-Javadoc)
- * @see us.tastybento.bskyblock.api.commands.CompositeCommand#setup()
- */
@Override
public void setup() {
setPermission("island.home");
@@ -29,9 +26,6 @@ public class IslandGoCommand extends CompositeCommand {
new CustomIslandMultiHomeHelp(this);
}
- /* (non-Javadoc)
- * @see us.tastybento.bskyblock.api.commands.CommandArgument#execute(org.bukkit.command.CommandSender, java.lang.String[])
- */
@Override
public boolean execute(User user, String label, List args) {
if (getIslands().getIsland(getWorld(), user.getUniqueId()) == null) {
diff --git a/src/main/java/world/bentobox/bbox/commands/island/IslandInfoCommand.java b/src/main/java/world/bentobox/bbox/commands/island/IslandInfoCommand.java
new file mode 100644
index 000000000..3b01e7853
--- /dev/null
+++ b/src/main/java/world/bentobox/bbox/commands/island/IslandInfoCommand.java
@@ -0,0 +1,4 @@
+package world.bentobox.bbox.commands.island;
+
+public class IslandInfoCommand {
+}
diff --git a/src/main/java/us/tastybento/bskyblock/commands/island/IslandLanguageCommand.java b/src/main/java/world/bentobox/bbox/commands/island/IslandLanguageCommand.java
similarity index 55%
rename from src/main/java/us/tastybento/bskyblock/commands/island/IslandLanguageCommand.java
rename to src/main/java/world/bentobox/bbox/commands/island/IslandLanguageCommand.java
index 33ba33aab..a99164841 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/island/IslandLanguageCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/island/IslandLanguageCommand.java
@@ -1,10 +1,10 @@
-package us.tastybento.bskyblock.commands.island;
+package world.bentobox.bbox.commands.island;
import java.util.List;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.panels.LanguagePanel;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.user.User;
+import world.bentobox.bbox.panels.LanguagePanel;
/**
* @author Poslovitch
@@ -15,9 +15,6 @@ public class IslandLanguageCommand extends CompositeCommand {
super(islandCommand, "language", "lang");
}
- /* (non-Javadoc)
- * @see us.tastybento.bskyblock.api.commands.CompositeCommand#setup()
- */
@Override
public void setup() {
setPermission("island.language");
@@ -25,9 +22,6 @@ public class IslandLanguageCommand extends CompositeCommand {
setDescription("commands.island.language.description");
}
- /* (non-Javadoc)
- * @see us.tastybento.bskyblock.api.commands.CommandArgument#execute(org.bukkit.command.CommandSender, java.lang.String[])
- */
@Override
public boolean execute(User user, String label, List args) {
LanguagePanel.openPanel(user);
diff --git a/src/main/java/us/tastybento/bskyblock/commands/island/IslandResetCommand.java b/src/main/java/world/bentobox/bbox/commands/island/IslandResetCommand.java
similarity index 90%
rename from src/main/java/us/tastybento/bskyblock/commands/island/IslandResetCommand.java
rename to src/main/java/world/bentobox/bbox/commands/island/IslandResetCommand.java
index b159fa378..ac9ead81c 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/island/IslandResetCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/island/IslandResetCommand.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.commands.island;
+package world.bentobox.bbox.commands.island;
import java.io.IOException;
import java.util.HashMap;
@@ -9,12 +9,12 @@ import java.util.UUID;
import org.bukkit.GameMode;
import org.bukkit.entity.Player;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.events.island.IslandEvent.Reason;
-import us.tastybento.bskyblock.api.localization.TextVariables;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.database.objects.Island;
-import us.tastybento.bskyblock.managers.island.NewIsland;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.events.island.IslandEvent.Reason;
+import world.bentobox.bbox.api.localization.TextVariables;
+import world.bentobox.bbox.api.user.User;
+import world.bentobox.bbox.database.objects.Island;
+import world.bentobox.bbox.managers.island.NewIsland;
public class IslandResetCommand extends CompositeCommand {
@@ -115,6 +115,6 @@ public class IslandResetCommand extends CompositeCommand {
}
private void setCooldown(User user) {
- cooldown.put(user.getUniqueId(), System.currentTimeMillis() + (getSettings().getResetLimit() * 1000L));
+ cooldown.put(user.getUniqueId(), System.currentTimeMillis() + (getIWM().getResetLimit(getWorld()) * 1000L));
}
}
diff --git a/src/main/java/us/tastybento/bskyblock/commands/island/IslandResetnameCommand.java b/src/main/java/world/bentobox/bbox/commands/island/IslandResetnameCommand.java
similarity index 77%
rename from src/main/java/us/tastybento/bskyblock/commands/island/IslandResetnameCommand.java
rename to src/main/java/world/bentobox/bbox/commands/island/IslandResetnameCommand.java
index 640e62fb3..b3ad628ab 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/island/IslandResetnameCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/island/IslandResetnameCommand.java
@@ -1,10 +1,10 @@
-package us.tastybento.bskyblock.commands.island;
+package world.bentobox.bbox.commands.island;
import java.util.List;
import java.util.UUID;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.user.User;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.user.User;
/**
* @author tastybento
@@ -23,9 +23,6 @@ public class IslandResetnameCommand extends CompositeCommand {
setDescription("commands.island.resetname.description");
}
- /* (non-Javadoc)
- * @see us.tastybento.bskyblock.api.commands.CommandArgument#execute(org.bukkit.command.CommandSender, java.lang.String[])
- */
@Override
public boolean execute(User user, String label, List args) {
UUID playerUUID = user.getUniqueId();
diff --git a/src/main/java/us/tastybento/bskyblock/commands/island/IslandSethomeCommand.java b/src/main/java/world/bentobox/bbox/commands/island/IslandSethomeCommand.java
similarity index 88%
rename from src/main/java/us/tastybento/bskyblock/commands/island/IslandSethomeCommand.java
rename to src/main/java/world/bentobox/bbox/commands/island/IslandSethomeCommand.java
index 31bf8755d..ec77db626 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/island/IslandSethomeCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/island/IslandSethomeCommand.java
@@ -1,12 +1,12 @@
-package us.tastybento.bskyblock.commands.island;
+package world.bentobox.bbox.commands.island;
import java.util.List;
import java.util.UUID;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.localization.TextVariables;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.util.Util;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.localization.TextVariables;
+import world.bentobox.bbox.api.user.User;
+import world.bentobox.bbox.util.Util;
public class IslandSethomeCommand extends CompositeCommand {
@@ -40,7 +40,7 @@ public class IslandSethomeCommand extends CompositeCommand {
user.sendMessage("commands.island.sethome.home-set");
} else {
// Dynamic home sizes with permissions
- int maxHomes = Util.getPermValue(user.getPlayer(), "island.maxhomes", getSettings().getMaxHomes());
+ int maxHomes = Util.getPermValue(user.getPlayer(), "island.maxhomes", getIWM().getMaxHomes(getWorld()));
if (maxHomes > 1) {
// Check the number given is a number
int number;
diff --git a/src/main/java/us/tastybento/bskyblock/commands/island/IslandSetnameCommand.java b/src/main/java/world/bentobox/bbox/commands/island/IslandSetnameCommand.java
similarity index 85%
rename from src/main/java/us/tastybento/bskyblock/commands/island/IslandSetnameCommand.java
rename to src/main/java/world/bentobox/bbox/commands/island/IslandSetnameCommand.java
index af027e522..ad37e2e5c 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/island/IslandSetnameCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/island/IslandSetnameCommand.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.commands.island;
+package world.bentobox.bbox.commands.island;
import java.util.List;
import java.util.UUID;
@@ -6,9 +6,9 @@ import java.util.stream.Collectors;
import org.bukkit.ChatColor;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.localization.TextVariables;
-import us.tastybento.bskyblock.api.user.User;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.localization.TextVariables;
+import world.bentobox.bbox.api.user.User;
/**
* @author tastybento
@@ -28,9 +28,6 @@ public class IslandSetnameCommand extends CompositeCommand {
setDescription("commands.island.setname.description");
}
- /* (non-Javadoc)
- * @see us.tastybento.bskyblock.api.commands.CommandArgument#execute(org.bukkit.command.CommandSender, java.lang.String[])
- */
@Override
public boolean execute(User user, String label, List args) {
UUID playerUUID = user.getUniqueId();
diff --git a/src/main/java/us/tastybento/bskyblock/commands/island/IslandSettingsCommand.java b/src/main/java/world/bentobox/bbox/commands/island/IslandSettingsCommand.java
similarity index 61%
rename from src/main/java/us/tastybento/bskyblock/commands/island/IslandSettingsCommand.java
rename to src/main/java/world/bentobox/bbox/commands/island/IslandSettingsCommand.java
index efb3fc770..8e3cd1b60 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/island/IslandSettingsCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/island/IslandSettingsCommand.java
@@ -1,12 +1,12 @@
-package us.tastybento.bskyblock.commands.island;
+package world.bentobox.bbox.commands.island;
import java.util.List;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.flags.Flag;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.panels.SettingsPanel;
-import us.tastybento.bskyblock.util.Util;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.flags.Flag;
+import world.bentobox.bbox.api.user.User;
+import world.bentobox.bbox.panels.SettingsPanel;
+import world.bentobox.bbox.util.Util;
/**
* @author Poslovitch
@@ -17,9 +17,6 @@ public class IslandSettingsCommand extends CompositeCommand {
super(islandCommand, "settings", "flags");
}
- /* (non-Javadoc)
- * @see us.tastybento.bskyblock.api.commands.CompositeCommand#setup()
- */
@Override
public void setup() {
setPermission("island.settings");
@@ -27,9 +24,6 @@ public class IslandSettingsCommand extends CompositeCommand {
setDescription("commands.island.settings.description");
}
- /* (non-Javadoc)
- * @see us.tastybento.bskyblock.api.commands.CommandArgument#execute(org.bukkit.command.CommandSender, java.lang.String[])
- */
@Override
public boolean execute(User user, String label, List args) {
// Settings are only shown if you are in the right world
diff --git a/src/main/java/world/bentobox/bbox/commands/island/IslandSpawnCommand.java b/src/main/java/world/bentobox/bbox/commands/island/IslandSpawnCommand.java
new file mode 100644
index 000000000..88169723f
--- /dev/null
+++ b/src/main/java/world/bentobox/bbox/commands/island/IslandSpawnCommand.java
@@ -0,0 +1,4 @@
+package world.bentobox.bbox.commands.island;
+
+public class IslandSpawnCommand {
+}
diff --git a/src/main/java/us/tastybento/bskyblock/commands/island/IslandUnbanCommand.java b/src/main/java/world/bentobox/bbox/commands/island/IslandUnbanCommand.java
similarity index 89%
rename from src/main/java/us/tastybento/bskyblock/commands/island/IslandUnbanCommand.java
rename to src/main/java/world/bentobox/bbox/commands/island/IslandUnbanCommand.java
index e77152d2f..b7455cea2 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/island/IslandUnbanCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/island/IslandUnbanCommand.java
@@ -1,15 +1,15 @@
-package us.tastybento.bskyblock.commands.island;
+package world.bentobox.bbox.commands.island;
import java.util.List;
import java.util.Optional;
import java.util.UUID;
import java.util.stream.Collectors;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.localization.TextVariables;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.database.objects.Island;
-import us.tastybento.bskyblock.util.Util;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.localization.TextVariables;
+import world.bentobox.bbox.api.user.User;
+import world.bentobox.bbox.database.objects.Island;
+import world.bentobox.bbox.util.Util;
public class IslandUnbanCommand extends CompositeCommand {
diff --git a/src/main/java/us/tastybento/bskyblock/commands/island/team/IslandTeamCommand.java b/src/main/java/world/bentobox/bbox/commands/island/team/IslandTeamCommand.java
similarity index 88%
rename from src/main/java/us/tastybento/bskyblock/commands/island/team/IslandTeamCommand.java
rename to src/main/java/world/bentobox/bbox/commands/island/team/IslandTeamCommand.java
index 0eba71c2b..1dfd0f216 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/island/team/IslandTeamCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/island/team/IslandTeamCommand.java
@@ -1,14 +1,14 @@
-package us.tastybento.bskyblock.commands.island.team;
+package world.bentobox.bbox.commands.island.team;
import java.util.List;
import java.util.Set;
import java.util.UUID;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.events.IslandBaseEvent;
-import us.tastybento.bskyblock.api.events.team.TeamEvent;
-import us.tastybento.bskyblock.api.localization.TextVariables;
-import us.tastybento.bskyblock.api.user.User;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.events.IslandBaseEvent;
+import world.bentobox.bbox.api.events.team.TeamEvent;
+import world.bentobox.bbox.api.localization.TextVariables;
+import world.bentobox.bbox.api.user.User;
public class IslandTeamCommand extends CompositeCommand {
diff --git a/src/main/java/us/tastybento/bskyblock/commands/island/team/IslandTeamInviteAcceptCommand.java b/src/main/java/world/bentobox/bbox/commands/island/team/IslandTeamInviteAcceptCommand.java
similarity index 89%
rename from src/main/java/us/tastybento/bskyblock/commands/island/team/IslandTeamInviteAcceptCommand.java
rename to src/main/java/world/bentobox/bbox/commands/island/team/IslandTeamInviteAcceptCommand.java
index b1883a160..8f78ec00d 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/island/team/IslandTeamInviteAcceptCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/island/team/IslandTeamInviteAcceptCommand.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.commands.island.team;
+package world.bentobox.bbox.commands.island.team;
import java.util.List;
import java.util.UUID;
@@ -6,12 +6,12 @@ import java.util.UUID;
import org.bukkit.GameMode;
import org.bukkit.Location;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.events.IslandBaseEvent;
-import us.tastybento.bskyblock.api.events.team.TeamEvent;
-import us.tastybento.bskyblock.api.localization.TextVariables;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.database.objects.Island;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.events.IslandBaseEvent;
+import world.bentobox.bbox.api.events.team.TeamEvent;
+import world.bentobox.bbox.api.localization.TextVariables;
+import world.bentobox.bbox.api.user.User;
+import world.bentobox.bbox.database.objects.Island;
public class IslandTeamInviteAcceptCommand extends CompositeCommand {
@@ -95,8 +95,8 @@ public class IslandTeamInviteAcceptCommand extends CompositeCommand {
getIslands().deleteIsland(island, true);
// TODO Set the cooldown
// Reset deaths
- if (getSettings().isTeamJoinDeathReset()) {
- getPlayers().setDeaths(playerUUID, 0);
+ if (getIWM().isTeamJoinDeathReset(getWorld())) {
+ getPlayers().setDeaths(getWorld(), playerUUID, 0);
}
// Put player back into normal mode
user.setGameMode(getIWM().getDefaultGameMode(getWorld()));
diff --git a/src/main/java/us/tastybento/bskyblock/commands/island/team/IslandTeamInviteCommand.java b/src/main/java/world/bentobox/bbox/commands/island/team/IslandTeamInviteCommand.java
similarity index 94%
rename from src/main/java/us/tastybento/bskyblock/commands/island/team/IslandTeamInviteCommand.java
rename to src/main/java/world/bentobox/bbox/commands/island/team/IslandTeamInviteCommand.java
index 5f3840cc8..73ef8c837 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/island/team/IslandTeamInviteCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/island/team/IslandTeamInviteCommand.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.commands.island.team;
+package world.bentobox.bbox.commands.island.team;
import java.util.ArrayList;
import java.util.List;
@@ -11,12 +11,12 @@ import org.bukkit.OfflinePlayer;
import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.events.IslandBaseEvent;
-import us.tastybento.bskyblock.api.events.team.TeamEvent;
-import us.tastybento.bskyblock.api.localization.TextVariables;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.util.Util;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.events.IslandBaseEvent;
+import world.bentobox.bbox.api.events.team.TeamEvent;
+import world.bentobox.bbox.api.localization.TextVariables;
+import world.bentobox.bbox.api.user.User;
+import world.bentobox.bbox.util.Util;
public class IslandTeamInviteCommand extends CompositeCommand {
diff --git a/src/main/java/us/tastybento/bskyblock/commands/island/team/IslandTeamInviteRejectCommand.java b/src/main/java/world/bentobox/bbox/commands/island/team/IslandTeamInviteRejectCommand.java
similarity index 85%
rename from src/main/java/us/tastybento/bskyblock/commands/island/team/IslandTeamInviteRejectCommand.java
rename to src/main/java/world/bentobox/bbox/commands/island/team/IslandTeamInviteRejectCommand.java
index e27fae93b..ec571956c 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/island/team/IslandTeamInviteRejectCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/island/team/IslandTeamInviteRejectCommand.java
@@ -1,13 +1,13 @@
-package us.tastybento.bskyblock.commands.island.team;
+package world.bentobox.bbox.commands.island.team;
import java.util.List;
import java.util.UUID;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.events.IslandBaseEvent;
-import us.tastybento.bskyblock.api.events.team.TeamEvent;
-import us.tastybento.bskyblock.api.localization.TextVariables;
-import us.tastybento.bskyblock.api.user.User;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.events.IslandBaseEvent;
+import world.bentobox.bbox.api.events.team.TeamEvent;
+import world.bentobox.bbox.api.localization.TextVariables;
+import world.bentobox.bbox.api.user.User;
public class IslandTeamInviteRejectCommand extends CompositeCommand {
diff --git a/src/main/java/us/tastybento/bskyblock/commands/island/team/IslandTeamKickCommand.java b/src/main/java/world/bentobox/bbox/commands/island/team/IslandTeamKickCommand.java
similarity index 95%
rename from src/main/java/us/tastybento/bskyblock/commands/island/team/IslandTeamKickCommand.java
rename to src/main/java/world/bentobox/bbox/commands/island/team/IslandTeamKickCommand.java
index 443c67dd6..eea293d3e 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/island/team/IslandTeamKickCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/island/team/IslandTeamKickCommand.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.commands.island.team;
+package world.bentobox.bbox.commands.island.team;
import java.util.HashSet;
import java.util.List;
@@ -7,8 +7,8 @@ import java.util.UUID;
import org.bukkit.scheduler.BukkitRunnable;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.user.User;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.user.User;
public class IslandTeamKickCommand extends CompositeCommand {
diff --git a/src/main/java/us/tastybento/bskyblock/commands/island/team/IslandTeamLeaveCommand.java b/src/main/java/world/bentobox/bbox/commands/island/team/IslandTeamLeaveCommand.java
similarity index 89%
rename from src/main/java/us/tastybento/bskyblock/commands/island/team/IslandTeamLeaveCommand.java
rename to src/main/java/world/bentobox/bbox/commands/island/team/IslandTeamLeaveCommand.java
index e2f5500df..83d376ba4 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/island/team/IslandTeamLeaveCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/island/team/IslandTeamLeaveCommand.java
@@ -1,11 +1,11 @@
-package us.tastybento.bskyblock.commands.island.team;
+package world.bentobox.bbox.commands.island.team;
import java.util.List;
import java.util.UUID;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.localization.TextVariables;
-import us.tastybento.bskyblock.api.user.User;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.localization.TextVariables;
+import world.bentobox.bbox.api.user.User;
public class IslandTeamLeaveCommand extends CompositeCommand {
diff --git a/src/main/java/us/tastybento/bskyblock/commands/island/team/IslandTeamPromoteCommand.java b/src/main/java/world/bentobox/bbox/commands/island/team/IslandTeamPromoteCommand.java
similarity index 93%
rename from src/main/java/us/tastybento/bskyblock/commands/island/team/IslandTeamPromoteCommand.java
rename to src/main/java/world/bentobox/bbox/commands/island/team/IslandTeamPromoteCommand.java
index a66eea8e6..0335f20c3 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/island/team/IslandTeamPromoteCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/island/team/IslandTeamPromoteCommand.java
@@ -1,10 +1,10 @@
-package us.tastybento.bskyblock.commands.island.team;
+package world.bentobox.bbox.commands.island.team;
import java.util.List;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.localization.TextVariables;
-import us.tastybento.bskyblock.api.user.User;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.localization.TextVariables;
+import world.bentobox.bbox.api.user.User;
public class IslandTeamPromoteCommand extends CompositeCommand {
diff --git a/src/main/java/us/tastybento/bskyblock/commands/island/team/IslandTeamSetownerCommand.java b/src/main/java/world/bentobox/bbox/commands/island/team/IslandTeamSetownerCommand.java
similarity index 90%
rename from src/main/java/us/tastybento/bskyblock/commands/island/team/IslandTeamSetownerCommand.java
rename to src/main/java/world/bentobox/bbox/commands/island/team/IslandTeamSetownerCommand.java
index 44b7adfd2..4628aa961 100644
--- a/src/main/java/us/tastybento/bskyblock/commands/island/team/IslandTeamSetownerCommand.java
+++ b/src/main/java/world/bentobox/bbox/commands/island/team/IslandTeamSetownerCommand.java
@@ -1,15 +1,15 @@
-package us.tastybento.bskyblock.commands.island.team;
+package world.bentobox.bbox.commands.island.team;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.UUID;
-import us.tastybento.bskyblock.api.commands.CompositeCommand;
-import us.tastybento.bskyblock.api.events.IslandBaseEvent;
-import us.tastybento.bskyblock.api.events.team.TeamEvent;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.util.Util;
+import world.bentobox.bbox.api.commands.CompositeCommand;
+import world.bentobox.bbox.api.events.IslandBaseEvent;
+import world.bentobox.bbox.api.events.team.TeamEvent;
+import world.bentobox.bbox.api.user.User;
+import world.bentobox.bbox.util.Util;
public class IslandTeamSetownerCommand extends CompositeCommand {
diff --git a/src/main/java/us/tastybento/bskyblock/database/AbstractDatabaseHandler.java b/src/main/java/world/bentobox/bbox/database/AbstractDatabaseHandler.java
similarity index 91%
rename from src/main/java/us/tastybento/bskyblock/database/AbstractDatabaseHandler.java
rename to src/main/java/world/bentobox/bbox/database/AbstractDatabaseHandler.java
index 56d021da2..711309bf8 100644
--- a/src/main/java/us/tastybento/bskyblock/database/AbstractDatabaseHandler.java
+++ b/src/main/java/world/bentobox/bbox/database/AbstractDatabaseHandler.java
@@ -1,10 +1,10 @@
-package us.tastybento.bskyblock.database;
+package world.bentobox.bbox.database;
import java.beans.IntrospectionException;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
-import us.tastybento.bskyblock.BSkyBlock;
+import world.bentobox.bbox.BentoBox;
/**
* An abstract class that handles insert/select-operations into/from a database
@@ -27,7 +27,7 @@ public abstract class AbstractDatabaseHandler {
*/
protected DatabaseConnecter databaseConnecter;
- protected BSkyBlock plugin;
+ protected BentoBox plugin;
/**
* Constructor
@@ -39,7 +39,7 @@ public abstract class AbstractDatabaseHandler {
* Contains the settings to create a connection to the database
* like host/port/database/user/password
*/
- protected AbstractDatabaseHandler(BSkyBlock plugin, Class type, DatabaseConnecter databaseConnecter) {
+ protected AbstractDatabaseHandler(BentoBox plugin, Class type, DatabaseConnecter databaseConnecter) {
this.plugin = plugin;
this.databaseConnecter = databaseConnecter;
this.dataObject = type;
diff --git a/src/main/java/us/tastybento/bskyblock/database/BSBDatabase.java b/src/main/java/world/bentobox/bbox/database/BSBDatabase.java
similarity index 94%
rename from src/main/java/us/tastybento/bskyblock/database/BSBDatabase.java
rename to src/main/java/world/bentobox/bbox/database/BSBDatabase.java
index 158f99bc4..d6732af76 100644
--- a/src/main/java/us/tastybento/bskyblock/database/BSBDatabase.java
+++ b/src/main/java/world/bentobox/bbox/database/BSBDatabase.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.database;
+package world.bentobox.bbox.database;
import java.beans.IntrospectionException;
import java.lang.reflect.InvocationTargetException;
@@ -6,8 +6,8 @@ import java.util.ArrayList;
import java.util.List;
import java.util.logging.Logger;
-import us.tastybento.bskyblock.BSkyBlock;
-import us.tastybento.bskyblock.api.addons.Addon;
+import world.bentobox.bbox.BentoBox;
+import world.bentobox.bbox.api.addons.Addon;
/**
* Handy class to store and load Java POJOs in the BSkyBlock Database
@@ -21,7 +21,7 @@ public class BSBDatabase {
private Logger logger;
@SuppressWarnings("unchecked")
- public BSBDatabase(BSkyBlock plugin, Class type) {
+ public BSBDatabase(BentoBox plugin, Class type) {
this.logger = plugin.getLogger();
handler = (AbstractDatabaseHandler) BSBDbSetup.getDatabase().getHandler(type);
}
diff --git a/src/main/java/us/tastybento/bskyblock/database/BSBDbSetup.java b/src/main/java/world/bentobox/bbox/database/BSBDbSetup.java
similarity index 74%
rename from src/main/java/us/tastybento/bskyblock/database/BSBDbSetup.java
rename to src/main/java/world/bentobox/bbox/database/BSBDbSetup.java
index 59c2e0f52..d9940d0ff 100755
--- a/src/main/java/us/tastybento/bskyblock/database/BSBDbSetup.java
+++ b/src/main/java/world/bentobox/bbox/database/BSBDbSetup.java
@@ -1,9 +1,9 @@
-package us.tastybento.bskyblock.database;
+package world.bentobox.bbox.database;
-import us.tastybento.bskyblock.BSkyBlock;
-import us.tastybento.bskyblock.database.flatfile.FlatFileDatabase;
-import us.tastybento.bskyblock.database.mongodb.MongoDBDatabase;
-import us.tastybento.bskyblock.database.mysql.MySQLDatabase;
+import world.bentobox.bbox.BentoBox;
+import world.bentobox.bbox.database.flatfile.FlatFileDatabase;
+import world.bentobox.bbox.database.mongodb.MongoDBDatabase;
+import world.bentobox.bbox.database.mysql.MySQLDatabase;
public abstract class BSBDbSetup {
@@ -14,7 +14,7 @@ public abstract class BSBDbSetup {
*/
public static BSBDbSetup getDatabase(){
for(DatabaseType type : DatabaseType.values()){
- if(type == BSkyBlock.getInstance().getSettings().getDatabaseType()) {
+ if(type == BentoBox.getInstance().getSettings().getDatabaseType()) {
return type.database;
}
}
diff --git a/src/main/java/us/tastybento/bskyblock/database/DatabaseConnecter.java b/src/main/java/world/bentobox/bbox/database/DatabaseConnecter.java
similarity index 97%
rename from src/main/java/us/tastybento/bskyblock/database/DatabaseConnecter.java
rename to src/main/java/world/bentobox/bbox/database/DatabaseConnecter.java
index 85976ee5e..e2e632ce2 100644
--- a/src/main/java/us/tastybento/bskyblock/database/DatabaseConnecter.java
+++ b/src/main/java/world/bentobox/bbox/database/DatabaseConnecter.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.database;
+package world.bentobox.bbox.database;
import java.util.Map;
diff --git a/src/main/java/us/tastybento/bskyblock/database/DatabaseConnectionSettingsImpl.java b/src/main/java/world/bentobox/bbox/database/DatabaseConnectionSettingsImpl.java
similarity index 97%
rename from src/main/java/us/tastybento/bskyblock/database/DatabaseConnectionSettingsImpl.java
rename to src/main/java/world/bentobox/bbox/database/DatabaseConnectionSettingsImpl.java
index a040bfcbf..e27412190 100644
--- a/src/main/java/us/tastybento/bskyblock/database/DatabaseConnectionSettingsImpl.java
+++ b/src/main/java/world/bentobox/bbox/database/DatabaseConnectionSettingsImpl.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.database;
+package world.bentobox.bbox.database;
public class DatabaseConnectionSettingsImpl {
private String host;
diff --git a/src/main/java/us/tastybento/bskyblock/database/flatfile/ConfigHandler.java b/src/main/java/world/bentobox/bbox/database/flatfile/ConfigHandler.java
similarity index 78%
rename from src/main/java/us/tastybento/bskyblock/database/flatfile/ConfigHandler.java
rename to src/main/java/world/bentobox/bbox/database/flatfile/ConfigHandler.java
index 8051806c0..b3f236fdd 100644
--- a/src/main/java/us/tastybento/bskyblock/database/flatfile/ConfigHandler.java
+++ b/src/main/java/world/bentobox/bbox/database/flatfile/ConfigHandler.java
@@ -1,10 +1,10 @@
-package us.tastybento.bskyblock.database.flatfile;
+package world.bentobox.bbox.database.flatfile;
import java.beans.IntrospectionException;
import java.lang.reflect.InvocationTargetException;
-import us.tastybento.bskyblock.BSkyBlock;
-import us.tastybento.bskyblock.database.DatabaseConnecter;
+import world.bentobox.bbox.BentoBox;
+import world.bentobox.bbox.database.DatabaseConnecter;
/**
* Class handles config settings saving and loading
@@ -16,7 +16,7 @@ import us.tastybento.bskyblock.database.DatabaseConnecter;
public class ConfigHandler extends FlatFileDatabaseHandler {
- public ConfigHandler(BSkyBlock plugin, Class type, DatabaseConnecter databaseConnecter) {
+ public ConfigHandler(BentoBox plugin, Class type, DatabaseConnecter databaseConnecter) {
super(plugin, type, databaseConnecter);
}
diff --git a/src/main/java/world/bentobox/bbox/database/flatfile/FlatFileDatabase.java b/src/main/java/world/bentobox/bbox/database/flatfile/FlatFileDatabase.java
new file mode 100755
index 000000000..279895c54
--- /dev/null
+++ b/src/main/java/world/bentobox/bbox/database/flatfile/FlatFileDatabase.java
@@ -0,0 +1,23 @@
+package world.bentobox.bbox.database.flatfile;
+
+import world.bentobox.bbox.BentoBox;
+import world.bentobox.bbox.database.AbstractDatabaseHandler;
+import world.bentobox.bbox.database.BSBDbSetup;
+
+public class FlatFileDatabase extends BSBDbSetup{
+
+ @Override
+ public AbstractDatabaseHandler> getHandler(Class> type) {
+ return new FlatFileDatabaseHandler<>(BentoBox.getInstance(), type, new FlatFileDatabaseConnecter(BentoBox.getInstance()));
+ }
+
+ /**
+ * Get the config
+ * @param type - config object type
+ * @return - the config handler
+ */
+ public AbstractDatabaseHandler> getConfig(Class> type) {
+ return new ConfigHandler<>(BentoBox.getInstance(), type, new FlatFileDatabaseConnecter(BentoBox.getInstance()));
+ }
+
+}
diff --git a/src/main/java/us/tastybento/bskyblock/database/flatfile/FlatFileDatabaseConnecter.java b/src/main/java/world/bentobox/bbox/database/flatfile/FlatFileDatabaseConnecter.java
similarity index 87%
rename from src/main/java/us/tastybento/bskyblock/database/flatfile/FlatFileDatabaseConnecter.java
rename to src/main/java/world/bentobox/bbox/database/flatfile/FlatFileDatabaseConnecter.java
index 9222b0536..4d2a5e96d 100644
--- a/src/main/java/us/tastybento/bskyblock/database/flatfile/FlatFileDatabaseConnecter.java
+++ b/src/main/java/world/bentobox/bbox/database/flatfile/FlatFileDatabaseConnecter.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.database.flatfile;
+package world.bentobox.bbox.database.flatfile;
import java.io.File;
import java.io.IOException;
@@ -14,18 +14,18 @@ import java.util.UUID;
import org.bukkit.configuration.file.YamlConfiguration;
-import us.tastybento.bskyblock.BSkyBlock;
-import us.tastybento.bskyblock.database.DatabaseConnecter;
+import world.bentobox.bbox.BentoBox;
+import world.bentobox.bbox.database.DatabaseConnecter;
public class FlatFileDatabaseConnecter implements DatabaseConnecter {
private static final int MAX_LOOPS = 100;
private static final String DATABASE_FOLDER_NAME = "database";
- private BSkyBlock plugin;
+ private BentoBox plugin;
private File dataFolder;
- public FlatFileDatabaseConnecter(BSkyBlock plugin) {
+ public FlatFileDatabaseConnecter(BentoBox plugin) {
this.plugin = plugin;
dataFolder = new File(plugin.getDataFolder(), DATABASE_FOLDER_NAME);
}
@@ -40,9 +40,6 @@ public class FlatFileDatabaseConnecter implements DatabaseConnecter {
return null; // Not used
}
- /* (non-Javadoc)
- * @see us.tastybento.bskyblock.database.DatabaseConnecter#loadYamlFile(java.lang.String, java.lang.String)
- */
@Override
public YamlConfiguration loadYamlFile(String tableName, String fileName) {
if (!fileName.endsWith(".yml")) {
@@ -78,9 +75,6 @@ public class FlatFileDatabaseConnecter implements DatabaseConnecter {
return config;
}
- /* (non-Javadoc)
- * @see us.tastybento.bskyblock.database.DatabaseConnecter#saveYamlFile(org.bukkit.configuration.file.YamlConfiguration, java.lang.String, java.lang.String)
- */
@Override
public void saveYamlFile(YamlConfiguration yamlConfig, String tableName, String fileName, Map commentMap) {
if (!fileName.endsWith(".yml")) {
@@ -94,7 +88,7 @@ public class FlatFileDatabaseConnecter implements DatabaseConnecter {
try {
// Approach is save to temp file (saving is not necessarily atomic), then move file atomically
// This has best chance of no file corruption
-
+
File tmpFile = File.createTempFile("yaml", null, tableFolder);
yamlConfig.save(tmpFile);
if (tmpFile.exists()) {
@@ -143,12 +137,9 @@ public class FlatFileDatabaseConnecter implements DatabaseConnecter {
Files.move(commentedFile.toPath(), file.toPath(), StandardCopyOption.REPLACE_EXISTING);
} catch (IOException e1) {
plugin.logError("Could not comment config file " + file.getName() + " " + e1.getMessage());
- }
+ }
}
- /* (non-Javadoc)
- * @see us.tastybento.bskyblock.database.DatabaseConnecter#getUniqueId(java.lang.String)
- */
@Override
public String getUniqueId(String tableName) {
UUID uuid = UUID.randomUUID();
@@ -161,9 +152,6 @@ public class FlatFileDatabaseConnecter implements DatabaseConnecter {
return uuid.toString();
}
- /* (non-Javadoc)
- * @see us.tastybento.bskyblock.database.DatabaseConnecter#uniqueIdExists(java.lang.String, java.lang.String)
- */
@Override
public boolean uniqueIdExists(String tableName, String key) {
File file = new File(dataFolder, tableName + File.separator + key + ".yml");
diff --git a/src/main/java/us/tastybento/bskyblock/database/flatfile/FlatFileDatabaseHandler.java b/src/main/java/world/bentobox/bbox/database/flatfile/FlatFileDatabaseHandler.java
similarity index 95%
rename from src/main/java/us/tastybento/bskyblock/database/flatfile/FlatFileDatabaseHandler.java
rename to src/main/java/world/bentobox/bbox/database/flatfile/FlatFileDatabaseHandler.java
index 484de3441..621b9ad41 100644
--- a/src/main/java/us/tastybento/bskyblock/database/flatfile/FlatFileDatabaseHandler.java
+++ b/src/main/java/world/bentobox/bbox/database/flatfile/FlatFileDatabaseHandler.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.database.flatfile;
+package world.bentobox.bbox.database.flatfile;
import java.beans.IntrospectionException;
import java.beans.PropertyDescriptor;
@@ -27,18 +27,18 @@ import org.bukkit.World;
import org.bukkit.configuration.MemorySection;
import org.bukkit.configuration.file.YamlConfiguration;
-import us.tastybento.bskyblock.BSkyBlock;
-import us.tastybento.bskyblock.Constants;
-import us.tastybento.bskyblock.Constants.GameType;
-import us.tastybento.bskyblock.api.configuration.ConfigComment;
-import us.tastybento.bskyblock.api.configuration.ConfigEntry;
-import us.tastybento.bskyblock.api.configuration.StoreAt;
-import us.tastybento.bskyblock.api.localization.TextVariables;
-import us.tastybento.bskyblock.database.AbstractDatabaseHandler;
-import us.tastybento.bskyblock.database.DatabaseConnecter;
-import us.tastybento.bskyblock.database.objects.adapters.Adapter;
-import us.tastybento.bskyblock.database.objects.adapters.AdapterInterface;
-import us.tastybento.bskyblock.util.Util;
+import world.bentobox.bbox.BentoBox;
+import world.bentobox.bbox.Constants;
+import world.bentobox.bbox.Constants.GameType;
+import world.bentobox.bbox.api.configuration.ConfigComment;
+import world.bentobox.bbox.api.configuration.ConfigEntry;
+import world.bentobox.bbox.api.configuration.StoreAt;
+import world.bentobox.bbox.api.localization.TextVariables;
+import world.bentobox.bbox.database.AbstractDatabaseHandler;
+import world.bentobox.bbox.database.DatabaseConnecter;
+import world.bentobox.bbox.database.objects.adapters.Adapter;
+import world.bentobox.bbox.database.objects.adapters.AdapterInterface;
+import world.bentobox.bbox.util.Util;
/**
* Class that creates a list of s filled with values from the corresponding
@@ -54,13 +54,10 @@ public class FlatFileDatabaseHandler extends AbstractDatabaseHandler {
private static final String DATABASE_FOLDER_NAME = "database";
protected boolean configFlag;
- public FlatFileDatabaseHandler(BSkyBlock plugin, Class type, DatabaseConnecter dbConnecter) {
+ public FlatFileDatabaseHandler(BentoBox plugin, Class type, DatabaseConnecter dbConnecter) {
super(plugin, type, dbConnecter);
}
- /* (non-Javadoc)
- * @see us.tastybento.bskyblock.database.managers.AbstractDatabaseHandler#loadObject(java.lang.String)
- */
@Override
public T loadObject(String key) throws InstantiationException, IllegalAccessException, InvocationTargetException, ClassNotFoundException, IntrospectionException {
String path = DATABASE_FOLDER_NAME + File.separator + dataObject.getSimpleName();
@@ -79,10 +76,6 @@ public class FlatFileDatabaseHandler extends AbstractDatabaseHandler {
return databaseConnecter.uniqueIdExists(dataObject.getSimpleName(), uniqueId);
}
-
- /* (non-Javadoc)
- * @see us.tastybento.bskyblock.database.managers.AbstractDatabaseHandler#loadObjects()
- */
@Override
public List loadObjects() throws InstantiationException, IllegalAccessException, InvocationTargetException, ClassNotFoundException, IntrospectionException {
List list = new ArrayList<>();
diff --git a/src/main/java/us/tastybento/bskyblock/database/mongodb/MongoDBDatabase.java b/src/main/java/world/bentobox/bbox/database/mongodb/MongoDBDatabase.java
similarity index 74%
rename from src/main/java/us/tastybento/bskyblock/database/mongodb/MongoDBDatabase.java
rename to src/main/java/world/bentobox/bbox/database/mongodb/MongoDBDatabase.java
index 0ce08b212..661bf0130 100755
--- a/src/main/java/us/tastybento/bskyblock/database/mongodb/MongoDBDatabase.java
+++ b/src/main/java/world/bentobox/bbox/database/mongodb/MongoDBDatabase.java
@@ -1,15 +1,15 @@
-package us.tastybento.bskyblock.database.mongodb;
+package world.bentobox.bbox.database.mongodb;
-import us.tastybento.bskyblock.BSkyBlock;
-import us.tastybento.bskyblock.database.AbstractDatabaseHandler;
-import us.tastybento.bskyblock.database.BSBDbSetup;
-import us.tastybento.bskyblock.database.DatabaseConnectionSettingsImpl;
+import world.bentobox.bbox.BentoBox;
+import world.bentobox.bbox.database.AbstractDatabaseHandler;
+import world.bentobox.bbox.database.BSBDbSetup;
+import world.bentobox.bbox.database.DatabaseConnectionSettingsImpl;
public class MongoDBDatabase extends BSBDbSetup{
@Override
public AbstractDatabaseHandler> getHandler(Class> type) {
- BSkyBlock plugin = BSkyBlock.getInstance();
+ BentoBox plugin = BentoBox.getInstance();
// Check if the MongoDB plugin exists
if (plugin.getServer().getPluginManager().getPlugin("BsbMongo") == null) {
plugin.logError("You must install BsbMongo plugin for MongoDB support!");
diff --git a/src/main/java/us/tastybento/bskyblock/database/mongodb/MongoDBDatabaseConnecter.java b/src/main/java/world/bentobox/bbox/database/mongodb/MongoDBDatabaseConnecter.java
similarity index 91%
rename from src/main/java/us/tastybento/bskyblock/database/mongodb/MongoDBDatabaseConnecter.java
rename to src/main/java/world/bentobox/bbox/database/mongodb/MongoDBDatabaseConnecter.java
index 8e0b5c583..14e7c8954 100644
--- a/src/main/java/us/tastybento/bskyblock/database/mongodb/MongoDBDatabaseConnecter.java
+++ b/src/main/java/world/bentobox/bbox/database/mongodb/MongoDBDatabaseConnecter.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.database.mongodb;
+package world.bentobox.bbox.database.mongodb;
import java.util.Map;
@@ -10,8 +10,8 @@ import com.mongodb.MongoCredential;
import com.mongodb.ServerAddress;
import com.mongodb.client.MongoDatabase;
-import us.tastybento.bskyblock.database.DatabaseConnecter;
-import us.tastybento.bskyblock.database.DatabaseConnectionSettingsImpl;
+import world.bentobox.bbox.database.DatabaseConnecter;
+import world.bentobox.bbox.database.DatabaseConnectionSettingsImpl;
public class MongoDBDatabaseConnecter implements DatabaseConnecter {
diff --git a/src/main/java/us/tastybento/bskyblock/database/mongodb/MongoDBDatabaseHandler.java b/src/main/java/world/bentobox/bbox/database/mongodb/MongoDBDatabaseHandler.java
similarity index 84%
rename from src/main/java/us/tastybento/bskyblock/database/mongodb/MongoDBDatabaseHandler.java
rename to src/main/java/world/bentobox/bbox/database/mongodb/MongoDBDatabaseHandler.java
index d439064ff..ba4f09d94 100644
--- a/src/main/java/us/tastybento/bskyblock/database/mongodb/MongoDBDatabaseHandler.java
+++ b/src/main/java/world/bentobox/bbox/database/mongodb/MongoDBDatabaseHandler.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.database.mongodb;
+package world.bentobox.bbox.database.mongodb;
import java.util.ArrayList;
import java.util.List;
@@ -18,15 +18,15 @@ import com.mongodb.client.model.IndexOptions;
import com.mongodb.client.model.Indexes;
import com.mongodb.util.JSON;
-import us.tastybento.bskyblock.BSkyBlock;
-import us.tastybento.bskyblock.api.flags.Flag;
-import us.tastybento.bskyblock.database.AbstractDatabaseHandler;
-import us.tastybento.bskyblock.database.DatabaseConnecter;
-import us.tastybento.bskyblock.database.mysql.adapters.FlagAdapter;
-import us.tastybento.bskyblock.database.mysql.adapters.LocationAdapter;
-import us.tastybento.bskyblock.database.mysql.adapters.PotionEffectTypeAdapter;
-import us.tastybento.bskyblock.database.mysql.adapters.WorldAdapter;
-import us.tastybento.bskyblock.database.objects.DataObject;
+import world.bentobox.bbox.BentoBox;
+import world.bentobox.bbox.api.flags.Flag;
+import world.bentobox.bbox.database.AbstractDatabaseHandler;
+import world.bentobox.bbox.database.DatabaseConnecter;
+import world.bentobox.bbox.database.mysql.adapters.FlagAdapter;
+import world.bentobox.bbox.database.mysql.adapters.LocationAdapter;
+import world.bentobox.bbox.database.mysql.adapters.PotionEffectTypeAdapter;
+import world.bentobox.bbox.database.mysql.adapters.WorldAdapter;
+import world.bentobox.bbox.database.objects.DataObject;
/**
*
@@ -45,7 +45,6 @@ public class MongoDBDatabaseHandler extends AbstractDatabaseHandler {
private MongoCollection collection;
private DatabaseConnecter dbConnecter;
- private BSkyBlock bskyblock;
/**
* Handles the connection to the database and creation of the initial database schema (tables) for
@@ -54,17 +53,16 @@ public class MongoDBDatabaseHandler extends AbstractDatabaseHandler {
* @param type - the type of class to be stored in the database. Must inherit DataObject
* @param dbConnecter - authentication details for the database
*/
- public MongoDBDatabaseHandler(BSkyBlock plugin, Class type, DatabaseConnecter dbConnecter) {
+ public MongoDBDatabaseHandler(BentoBox plugin, Class type, DatabaseConnecter dbConnecter) {
super(plugin, type, dbConnecter);
- this.bskyblock = plugin;
this.dbConnecter = dbConnecter;
/*
Connection to the database
- */
+ */
MongoDatabase database = (MongoDatabase) dbConnecter.createConnection();
collection = database.getCollection(dataObject.getCanonicalName());
IndexOptions indexOptions = new IndexOptions().unique(true);
- collection.createIndex(Indexes.text(UNIQUEID), indexOptions);
+ collection.createIndex(Indexes.text(UNIQUEID), indexOptions);
}
// Gets the GSON builder
@@ -75,7 +73,7 @@ public class MongoDBDatabaseHandler extends AbstractDatabaseHandler {
// Register adapters
builder.registerTypeAdapter(Location.class, new LocationAdapter(plugin)) ;
builder.registerTypeAdapter(World.class, new WorldAdapter(plugin));
- builder.registerTypeAdapter(Flag.class, new FlagAdapter(bskyblock));
+ builder.registerTypeAdapter(Flag.class, new FlagAdapter(plugin));
builder.registerTypeAdapter(PotionEffectType.class, new PotionEffectTypeAdapter());
// Keep null in the database
builder.serializeNulls();
@@ -98,7 +96,7 @@ public class MongoDBDatabaseHandler extends AbstractDatabaseHandler {
}
@Override
- public T loadObject(String uniqueId) {
+ public T loadObject(String uniqueId) {
Document doc = collection.find(new Document(MONGO_ID, uniqueId)).limit(1).first();
if (doc != null) {
Gson gson = getGSON();
@@ -147,9 +145,6 @@ public class MongoDBDatabaseHandler extends AbstractDatabaseHandler {
}
}
- /* (non-Javadoc)
- * @see us.tastybento.bskyblock.database.managers.AbstractDatabaseHandler#objectExists(java.lang.String)
- */
@Override
public boolean objectExists(String uniqueId) {
return collection.find(new Document(MONGO_ID, uniqueId)).first() != null;
diff --git a/src/main/java/us/tastybento/bskyblock/database/mysql/MySQLDatabase.java b/src/main/java/world/bentobox/bbox/database/mysql/MySQLDatabase.java
similarity index 61%
rename from src/main/java/us/tastybento/bskyblock/database/mysql/MySQLDatabase.java
rename to src/main/java/world/bentobox/bbox/database/mysql/MySQLDatabase.java
index 0a92c7164..b39d45690 100755
--- a/src/main/java/us/tastybento/bskyblock/database/mysql/MySQLDatabase.java
+++ b/src/main/java/world/bentobox/bbox/database/mysql/MySQLDatabase.java
@@ -1,15 +1,15 @@
-package us.tastybento.bskyblock.database.mysql;
+package world.bentobox.bbox.database.mysql;
-import us.tastybento.bskyblock.BSkyBlock;
-import us.tastybento.bskyblock.database.AbstractDatabaseHandler;
-import us.tastybento.bskyblock.database.BSBDbSetup;
-import us.tastybento.bskyblock.database.DatabaseConnectionSettingsImpl;
+import world.bentobox.bbox.BentoBox;
+import world.bentobox.bbox.database.AbstractDatabaseHandler;
+import world.bentobox.bbox.database.BSBDbSetup;
+import world.bentobox.bbox.database.DatabaseConnectionSettingsImpl;
public class MySQLDatabase extends BSBDbSetup{
@Override
public AbstractDatabaseHandler> getHandler(Class> type) {
- BSkyBlock plugin = BSkyBlock.getInstance();
+ BentoBox plugin = BentoBox.getInstance();
return new MySQLDatabaseHandler<>(plugin, type, new MySQLDatabaseConnecter(new DatabaseConnectionSettingsImpl(
plugin.getSettings().getDbHost(),
plugin.getSettings().getDbPort(),
diff --git a/src/main/java/us/tastybento/bskyblock/database/mysql/MySQLDatabaseConnecter.java b/src/main/java/world/bentobox/bbox/database/mysql/MySQLDatabaseConnecter.java
similarity index 93%
rename from src/main/java/us/tastybento/bskyblock/database/mysql/MySQLDatabaseConnecter.java
rename to src/main/java/world/bentobox/bbox/database/mysql/MySQLDatabaseConnecter.java
index a1588a06d..001d8bb5d 100644
--- a/src/main/java/us/tastybento/bskyblock/database/mysql/MySQLDatabaseConnecter.java
+++ b/src/main/java/world/bentobox/bbox/database/mysql/MySQLDatabaseConnecter.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.database.mysql;
+package world.bentobox.bbox.database.mysql;
import java.sql.Connection;
import java.sql.DriverManager;
@@ -8,8 +8,8 @@ import java.util.Map;
import org.bukkit.Bukkit;
import org.bukkit.configuration.file.YamlConfiguration;
-import us.tastybento.bskyblock.database.DatabaseConnecter;
-import us.tastybento.bskyblock.database.DatabaseConnectionSettingsImpl;
+import world.bentobox.bbox.database.DatabaseConnecter;
+import world.bentobox.bbox.database.DatabaseConnectionSettingsImpl;
public class MySQLDatabaseConnecter implements DatabaseConnecter {
diff --git a/src/main/java/us/tastybento/bskyblock/database/mysql/MySQLDatabaseHandler.java b/src/main/java/world/bentobox/bbox/database/mysql/MySQLDatabaseHandler.java
similarity index 88%
rename from src/main/java/us/tastybento/bskyblock/database/mysql/MySQLDatabaseHandler.java
rename to src/main/java/world/bentobox/bbox/database/mysql/MySQLDatabaseHandler.java
index 5552b68ab..c3ca8fc86 100644
--- a/src/main/java/us/tastybento/bskyblock/database/mysql/MySQLDatabaseHandler.java
+++ b/src/main/java/world/bentobox/bbox/database/mysql/MySQLDatabaseHandler.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.database.mysql;
+package world.bentobox.bbox.database.mysql;
import java.lang.reflect.Method;
import java.sql.Connection;
@@ -16,15 +16,15 @@ import org.bukkit.potion.PotionEffectType;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
-import us.tastybento.bskyblock.BSkyBlock;
-import us.tastybento.bskyblock.api.flags.Flag;
-import us.tastybento.bskyblock.database.AbstractDatabaseHandler;
-import us.tastybento.bskyblock.database.DatabaseConnecter;
-import us.tastybento.bskyblock.database.mysql.adapters.FlagAdapter;
-import us.tastybento.bskyblock.database.mysql.adapters.LocationAdapter;
-import us.tastybento.bskyblock.database.mysql.adapters.PotionEffectTypeAdapter;
-import us.tastybento.bskyblock.database.mysql.adapters.WorldAdapter;
-import us.tastybento.bskyblock.database.objects.DataObject;
+import world.bentobox.bbox.BentoBox;
+import world.bentobox.bbox.api.flags.Flag;
+import world.bentobox.bbox.database.AbstractDatabaseHandler;
+import world.bentobox.bbox.database.DatabaseConnecter;
+import world.bentobox.bbox.database.mysql.adapters.FlagAdapter;
+import world.bentobox.bbox.database.mysql.adapters.LocationAdapter;
+import world.bentobox.bbox.database.mysql.adapters.PotionEffectTypeAdapter;
+import world.bentobox.bbox.database.mysql.adapters.WorldAdapter;
+import world.bentobox.bbox.database.objects.DataObject;
/**
*
@@ -41,7 +41,6 @@ public class MySQLDatabaseHandler extends AbstractDatabaseHandler {
*/
private Connection connection;
- private BSkyBlock bskyblock;
/**
* Handles the connection to the database and creation of the initial database schema (tables) for
@@ -50,9 +49,8 @@ public class MySQLDatabaseHandler extends AbstractDatabaseHandler {
* @param type - the type of class to be stored in the database. Must inherit DataObject
* @param dbConnecter - authentication details for the database
*/
- public MySQLDatabaseHandler(BSkyBlock plugin, Class type, DatabaseConnecter dbConnecter) {
+ public MySQLDatabaseHandler(BentoBox plugin, Class type, DatabaseConnecter dbConnecter) {
super(plugin, type, dbConnecter);
- this.bskyblock = plugin;
connection = (Connection)dbConnecter.createConnection();
// Check if the table exists in the database and if not, create it
createSchema();
@@ -81,7 +79,7 @@ public class MySQLDatabaseHandler extends AbstractDatabaseHandler {
// Register adapters
builder.registerTypeAdapter(Location.class, new LocationAdapter(plugin)) ;
builder.registerTypeAdapter(World.class, new WorldAdapter(plugin));
- builder.registerTypeAdapter(Flag.class, new FlagAdapter(bskyblock));
+ builder.registerTypeAdapter(Flag.class, new FlagAdapter(plugin));
builder.registerTypeAdapter(PotionEffectType.class, new PotionEffectTypeAdapter());
// Keep null in the database
builder.serializeNulls();
@@ -149,7 +147,7 @@ public class MySQLDatabaseHandler extends AbstractDatabaseHandler {
String toStore = gson.toJson(instance);
preparedStatement.setString(1, toStore);
preparedStatement.setString(2, toStore);
- preparedStatement.execute();
+ preparedStatement.execute();
} catch (SQLException e) {
plugin.logError("Could not save object " + instance.getClass().getName() + " " + e.getMessage());
}
@@ -174,9 +172,6 @@ public class MySQLDatabaseHandler extends AbstractDatabaseHandler {
}
}
- /* (non-Javadoc)
- * @see us.tastybento.bskyblock.database.managers.AbstractDatabaseHandler#objectExists(java.lang.String)
- */
@Override
public boolean objectExists(String uniqueId) {
// Create the query to see if this key exists
diff --git a/src/main/java/us/tastybento/bskyblock/database/mysql/adapters/FlagAdapter.java b/src/main/java/world/bentobox/bbox/database/mysql/adapters/FlagAdapter.java
similarity index 77%
rename from src/main/java/us/tastybento/bskyblock/database/mysql/adapters/FlagAdapter.java
rename to src/main/java/world/bentobox/bbox/database/mysql/adapters/FlagAdapter.java
index 4e2f0889b..b89c962ce 100644
--- a/src/main/java/us/tastybento/bskyblock/database/mysql/adapters/FlagAdapter.java
+++ b/src/main/java/world/bentobox/bbox/database/mysql/adapters/FlagAdapter.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.database.mysql.adapters;
+package world.bentobox.bbox.database.mysql.adapters;
import java.io.IOException;
@@ -7,14 +7,14 @@ import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonToken;
import com.google.gson.stream.JsonWriter;
-import us.tastybento.bskyblock.BSkyBlock;
-import us.tastybento.bskyblock.api.flags.Flag;
+import world.bentobox.bbox.BentoBox;
+import world.bentobox.bbox.api.flags.Flag;
public class FlagAdapter extends TypeAdapter {
- private BSkyBlock plugin;
+ private BentoBox plugin;
- public FlagAdapter(BSkyBlock plugin) {
+ public FlagAdapter(BentoBox plugin) {
this.plugin = plugin;
}
diff --git a/src/main/java/us/tastybento/bskyblock/database/mysql/adapters/LocationAdapter.java b/src/main/java/world/bentobox/bbox/database/mysql/adapters/LocationAdapter.java
similarity index 96%
rename from src/main/java/us/tastybento/bskyblock/database/mysql/adapters/LocationAdapter.java
rename to src/main/java/world/bentobox/bbox/database/mysql/adapters/LocationAdapter.java
index cab2dbdd8..7d534216d 100644
--- a/src/main/java/us/tastybento/bskyblock/database/mysql/adapters/LocationAdapter.java
+++ b/src/main/java/world/bentobox/bbox/database/mysql/adapters/LocationAdapter.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.database.mysql.adapters;
+package world.bentobox.bbox.database.mysql.adapters;
import java.io.IOException;
diff --git a/src/main/java/us/tastybento/bskyblock/database/mysql/adapters/PotionEffectTypeAdapter.java b/src/main/java/world/bentobox/bbox/database/mysql/adapters/PotionEffectTypeAdapter.java
similarity index 93%
rename from src/main/java/us/tastybento/bskyblock/database/mysql/adapters/PotionEffectTypeAdapter.java
rename to src/main/java/world/bentobox/bbox/database/mysql/adapters/PotionEffectTypeAdapter.java
index df6b24eb9..7a3bde4c5 100644
--- a/src/main/java/us/tastybento/bskyblock/database/mysql/adapters/PotionEffectTypeAdapter.java
+++ b/src/main/java/world/bentobox/bbox/database/mysql/adapters/PotionEffectTypeAdapter.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.database.mysql.adapters;
+package world.bentobox.bbox.database.mysql.adapters;
import java.io.IOException;
diff --git a/src/main/java/us/tastybento/bskyblock/database/mysql/adapters/WorldAdapter.java b/src/main/java/world/bentobox/bbox/database/mysql/adapters/WorldAdapter.java
similarity index 94%
rename from src/main/java/us/tastybento/bskyblock/database/mysql/adapters/WorldAdapter.java
rename to src/main/java/world/bentobox/bbox/database/mysql/adapters/WorldAdapter.java
index f9ee60c16..e1535ac83 100644
--- a/src/main/java/us/tastybento/bskyblock/database/mysql/adapters/WorldAdapter.java
+++ b/src/main/java/world/bentobox/bbox/database/mysql/adapters/WorldAdapter.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.database.mysql.adapters;
+package world.bentobox.bbox.database.mysql.adapters;
import java.io.IOException;
diff --git a/src/main/java/us/tastybento/bskyblock/database/objects/DataObject.java b/src/main/java/world/bentobox/bbox/database/objects/DataObject.java
similarity index 64%
rename from src/main/java/us/tastybento/bskyblock/database/objects/DataObject.java
rename to src/main/java/world/bentobox/bbox/database/objects/DataObject.java
index a45871308..7ea039305 100644
--- a/src/main/java/us/tastybento/bskyblock/database/objects/DataObject.java
+++ b/src/main/java/world/bentobox/bbox/database/objects/DataObject.java
@@ -1,6 +1,6 @@
-package us.tastybento.bskyblock.database.objects;
+package world.bentobox.bbox.database.objects;
-import us.tastybento.bskyblock.BSkyBlock;
+import world.bentobox.bbox.BentoBox;
/**
* Contains fields that must be in any data object
@@ -9,8 +9,8 @@ import us.tastybento.bskyblock.BSkyBlock;
*/
public interface DataObject {
- default BSkyBlock getPlugin() {
- return BSkyBlock.getInstance();
+ default BentoBox getPlugin() {
+ return BentoBox.getInstance();
}
/**
diff --git a/src/main/java/us/tastybento/bskyblock/database/objects/Island.java b/src/main/java/world/bentobox/bbox/database/objects/Island.java
similarity index 93%
rename from src/main/java/us/tastybento/bskyblock/database/objects/Island.java
rename to src/main/java/world/bentobox/bbox/database/objects/Island.java
index d540b6273..299cae441 100755
--- a/src/main/java/us/tastybento/bskyblock/database/objects/Island.java
+++ b/src/main/java/world/bentobox/bbox/database/objects/Island.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.database.objects;
+package world.bentobox.bbox.database.objects;
import java.util.Date;
import java.util.EnumMap;
@@ -18,16 +18,16 @@ import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ImmutableSet.Builder;
import com.google.gson.annotations.Expose;
-import us.tastybento.bskyblock.BSkyBlock;
-import us.tastybento.bskyblock.Settings;
-import us.tastybento.bskyblock.api.flags.Flag;
-import us.tastybento.bskyblock.api.user.User;
-import us.tastybento.bskyblock.database.objects.adapters.Adapter;
-import us.tastybento.bskyblock.database.objects.adapters.FlagSerializer;
-import us.tastybento.bskyblock.lists.Flags;
-import us.tastybento.bskyblock.managers.RanksManager;
-import us.tastybento.bskyblock.util.Pair;
-import us.tastybento.bskyblock.util.Util;
+import world.bentobox.bbox.BentoBox;
+import world.bentobox.bbox.Settings;
+import world.bentobox.bbox.api.flags.Flag;
+import world.bentobox.bbox.api.user.User;
+import world.bentobox.bbox.database.objects.adapters.Adapter;
+import world.bentobox.bbox.database.objects.adapters.FlagSerializer;
+import world.bentobox.bbox.lists.Flags;
+import world.bentobox.bbox.managers.RanksManager;
+import world.bentobox.bbox.util.Pair;
+import world.bentobox.bbox.util.Util;
/**
* Stores all the info about an island
@@ -101,7 +101,7 @@ public class Island implements DataObject {
world = location.getWorld();
// Make a copy of the location
center = new Location(location.getWorld(), location.getX(), location.getY(), location.getZ());
- range = BSkyBlock.getInstance().getIWM().getIslandDistance(world);
+ range = BentoBox.getInstance().getIWM().getIslandDistance(world);
this.protectionRange = protectionRange;
}
@@ -403,7 +403,7 @@ public class Island implements DataObject {
/**
* Removes a player from the team member map. Do not call this directly.
- * Use {@link us.tastybento.bskyblock.managers.IslandsManager#removePlayer(World, UUID)}
+ * Use {@link world.bentobox.bbox.managers.IslandsManager#removePlayer(World, UUID)}
* @param playerUUID - uuid of player
*/
public void removeMember(UUID playerUUID) {
@@ -450,9 +450,9 @@ public class Island implements DataObject {
public void setFlagsDefaults() {
Map result = new HashMap<>();
Flags.values().stream().filter(f -> f.getType().equals(Flag.Type.PROTECTION))
- .forEach(f -> result.put(f, BSkyBlock.getInstance().getIWM().getDefaultIslandFlags(world).getOrDefault(f, f.getDefaultRank())));
+ .forEach(f -> result.put(f, BentoBox.getInstance().getIWM().getDefaultIslandFlags(world).getOrDefault(f, f.getDefaultRank())));
Flags.values().stream().filter(f -> f.getType().equals(Flag.Type.SETTING))
- .forEach(f -> result.put(f, BSkyBlock.getInstance().getIWM().getDefaultIslandSettings(world).getOrDefault(f, f.getDefaultRank())));
+ .forEach(f -> result.put(f, BentoBox.getInstance().getIWM().getDefaultIslandSettings(world).getOrDefault(f, f.getDefaultRank())));
this.setFlags(result);
}
@@ -590,7 +590,7 @@ public class Island implements DataObject {
* @param world - world to check
* @return true always
*/
- public boolean showInfo(BSkyBlock plugin, User user, World world) {
+ public boolean showInfo(BentoBox plugin, User user, World world) {
user.sendMessage("commands.admin.info.title");
if (owner == null) {
user.sendMessage("commands.admin.info.unowned");
@@ -599,9 +599,9 @@ public class Island implements DataObject {
Date d = new Date(plugin.getServer().getOfflinePlayer(owner).getLastPlayed());
user.sendMessage("commands.admin.info.last-login","[date]", d.toString());
- user.sendMessage("commands.admin.info.deaths", "[number]", String.valueOf(plugin.getPlayers().getDeaths(owner)));
+ user.sendMessage("commands.admin.info.deaths", "[number]", String.valueOf(plugin.getPlayers().getDeaths(world, owner)));
String resets = String.valueOf(plugin.getPlayers().getResets(world, owner));
- String total = plugin.getSettings().getResetLimit() < 0 ? "Unlimited" : String.valueOf(plugin.getSettings().getResetLimit());
+ String total = plugin.getIWM().getResetLimit(world) < 0 ? "Unlimited" : String.valueOf(plugin.getIWM().getResetLimit(world));
user.sendMessage("commands.admin.info.resets-left", "[number]", resets, "[total]", total);
// Show team members
showMembers(plugin, user, world);
@@ -632,7 +632,7 @@ public class Island implements DataObject {
* @param user - user who is requesting
* @param world - world to check
*/
- public void showMembers(BSkyBlock plugin, User user, World world) {
+ public void showMembers(BentoBox plugin, User user, World world) {
if (plugin.getIslands().inTeam(world, user.getUniqueId())) {
user.sendMessage("commands.admin.info.team-members-title");
members.forEach((u, i) -> {
diff --git a/src/main/java/us/tastybento/bskyblock/database/objects/Names.java b/src/main/java/world/bentobox/bbox/database/objects/Names.java
similarity index 94%
rename from src/main/java/us/tastybento/bskyblock/database/objects/Names.java
rename to src/main/java/world/bentobox/bbox/database/objects/Names.java
index 30e462328..96b3277db 100644
--- a/src/main/java/us/tastybento/bskyblock/database/objects/Names.java
+++ b/src/main/java/world/bentobox/bbox/database/objects/Names.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.database.objects;
+package world.bentobox.bbox.database.objects;
import java.util.UUID;
diff --git a/src/main/java/us/tastybento/bskyblock/database/objects/Players.java b/src/main/java/world/bentobox/bbox/database/objects/Players.java
similarity index 87%
rename from src/main/java/us/tastybento/bskyblock/database/objects/Players.java
rename to src/main/java/world/bentobox/bbox/database/objects/Players.java
index 44e81225f..720e79720 100755
--- a/src/main/java/us/tastybento/bskyblock/database/objects/Players.java
+++ b/src/main/java/world/bentobox/bbox/database/objects/Players.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.database.objects;
+package world.bentobox.bbox.database.objects;
import java.util.Calendar;
import java.util.Date;
@@ -14,8 +14,8 @@ import org.bukkit.entity.Player;
import com.google.gson.annotations.Expose;
-import us.tastybento.bskyblock.BSkyBlock;
-import us.tastybento.bskyblock.util.Util;
+import world.bentobox.bbox.BentoBox;
+import world.bentobox.bbox.util.Util;
/**
* Tracks the following info on the player
@@ -34,7 +34,7 @@ public class Players implements DataObject {
@Expose
private String locale = "";
@Expose
- private int deaths;
+ private Map deaths = new HashMap<>();
@Expose
private Map kickedList = new HashMap<>();
@@ -49,7 +49,7 @@ public class Players implements DataObject {
* Constructor - initializes the state variables
*
*/
- public Players(BSkyBlock plugin, UUID uniqueId) {
+ public Players(BentoBox plugin, UUID uniqueId) {
this.uniqueId = uniqueId.toString();
homeLocations = new HashMap<>();
locale = "";
@@ -226,23 +226,25 @@ public class Players implements DataObject {
/**
* @return the deaths
*/
- public int getDeaths() {
+ public Map getDeaths() {
return deaths;
}
/**
+ * @param world
* @param deaths the deaths to set
*/
- public void setDeaths(int deaths) {
- this.deaths = deaths > getPlugin().getSettings().getDeathsMax() ? getPlugin().getSettings().getDeathsMax() : deaths;
+ public void setDeaths(World world, int deaths) {
+ this.deaths.put(world.getName(), deaths > getPlugin().getIWM().getDeathsMax(world) ? getPlugin().getIWM().getDeathsMax(world) : deaths);
}
/**
* Add death
*/
- public void addDeath() {
- if (deaths < getPlugin().getSettings().getDeathsMax()) {
- deaths++;
+ public void addDeath(World world) {
+ deaths.putIfAbsent(world.getName(), 0);
+ if (deaths.get(world.getName()) < getPlugin().getIWM().getDeathsMax(world)) {
+ deaths.put(world.getName(), deaths.get(world.getName()) + 1);
}
}
@@ -305,4 +307,20 @@ public class Players implements DataObject {
resets.merge(world.getName(), 1, Integer::sum);
}
+ /**
+ * Get the number of deaths in this world
+ * @param world - world
+ * @return number of deaths
+ */
+ public int getDeaths(World world) {
+ return deaths.getOrDefault(world.getName(), 0);
+ }
+
+ /**
+ * @param deaths the deaths to set
+ */
+ public void setDeaths(Map deaths) {
+ this.deaths = deaths;
+ }
+
}
diff --git a/src/main/java/us/tastybento/bskyblock/database/objects/adapters/Adapter.java b/src/main/java/world/bentobox/bbox/database/objects/adapters/Adapter.java
similarity index 86%
rename from src/main/java/us/tastybento/bskyblock/database/objects/adapters/Adapter.java
rename to src/main/java/world/bentobox/bbox/database/objects/adapters/Adapter.java
index 666ca5bb4..5e6087ad4 100644
--- a/src/main/java/us/tastybento/bskyblock/database/objects/adapters/Adapter.java
+++ b/src/main/java/world/bentobox/bbox/database/objects/adapters/Adapter.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.database.objects.adapters;
+package world.bentobox.bbox.database.objects.adapters;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
diff --git a/src/main/java/us/tastybento/bskyblock/database/objects/adapters/AdapterInterface.java b/src/main/java/world/bentobox/bbox/database/objects/adapters/AdapterInterface.java
similarity index 88%
rename from src/main/java/us/tastybento/bskyblock/database/objects/adapters/AdapterInterface.java
rename to src/main/java/world/bentobox/bbox/database/objects/adapters/AdapterInterface.java
index 4fc75b850..75f6a706e 100644
--- a/src/main/java/us/tastybento/bskyblock/database/objects/adapters/AdapterInterface.java
+++ b/src/main/java/world/bentobox/bbox/database/objects/adapters/AdapterInterface.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.database.objects.adapters;
+package world.bentobox.bbox.database.objects.adapters;
/**
diff --git a/src/main/java/us/tastybento/bskyblock/database/objects/adapters/FlagSerializer.java b/src/main/java/world/bentobox/bbox/database/objects/adapters/FlagSerializer.java
similarity index 67%
rename from src/main/java/us/tastybento/bskyblock/database/objects/adapters/FlagSerializer.java
rename to src/main/java/world/bentobox/bbox/database/objects/adapters/FlagSerializer.java
index 9a4e50fb4..37eea2489 100644
--- a/src/main/java/us/tastybento/bskyblock/database/objects/adapters/FlagSerializer.java
+++ b/src/main/java/world/bentobox/bbox/database/objects/adapters/FlagSerializer.java
@@ -1,4 +1,4 @@
-package us.tastybento.bskyblock.database.objects.adapters;
+package world.bentobox.bbox.database.objects.adapters;
import java.util.HashMap;
import java.util.Map;
@@ -6,13 +6,13 @@ import java.util.Map.Entry;
import org.bukkit.configuration.MemorySection;
-import us.tastybento.bskyblock.BSkyBlock;
-import us.tastybento.bskyblock.api.flags.Flag;
+import world.bentobox.bbox.BentoBox;
+import world.bentobox.bbox.api.flags.Flag;
/**
- * Serializes the {@link us.tastybento.bskyblock.database.objects.Island#getFlags() getFlags()} and
- * {@link us.tastybento.bskyblock.database.objects.Island#setFlags(Map)} () setFlags()}
- * in {@link us.tastybento.bskyblock.database.objects.Island}
+ * Serializes the {@link world.bentobox.bbox.database.objects.Island#getFlags() getFlags()} and
+ * {@link world.bentobox.bbox.database.objects.Island#setFlags(Map)} () setFlags()}
+ * in {@link world.bentobox.bbox.database.objects.Island}
* @author tastybento
*
*/
@@ -29,11 +29,11 @@ public class FlagSerializer implements AdapterInterface