mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-01 00:10:40 +01:00
Switch to BentoBox
This commit is contained in:
parent
da04246a50
commit
268a301a47
63
README.md
Executable file → Normal file
63
README.md
Executable file → Normal file
@ -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
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>codemc-repo</id>
|
||||
<url>https://repo.codemc.org/repository/maven-public/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>us.tastybento</groupId>
|
||||
<artifactId>bskyblock</artifactId>
|
||||
<version>FC-0.74</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
```
|
||||
|
||||
You can find the javadoc here: https://ci.codemc.org/job/Tastybento/job/bskyblock/javadoc/
|
||||
# bentobox
|
||||
BentoBox Minecraft Plugin
|
||||
|
267
config.yml
267
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.<number>
|
||||
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.<number>
|
||||
# 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 <number> or go <number>
|
||||
# Use this permission to set for specific user groups: askyblock.island.maxhomes.<number>
|
||||
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 <player>)
|
||||
# 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
|
||||
|
144
plugin.yml
144
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
|
52
pom.xml
52
pom.xml
@ -1,12 +1,11 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>us.tastybento</groupId>
|
||||
<artifactId>bskyblock</artifactId>
|
||||
<groupId>world.bentobox</groupId>
|
||||
<artifactId>bentobox</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>FC-0.79</version>
|
||||
<name>BSkyBlock</name>
|
||||
<description>The next generation of ASkyBlock</description>
|
||||
<name>BentoBox</name>
|
||||
<properties>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
@ -64,16 +63,38 @@
|
||||
<!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId>
|
||||
<version>1.6</version> <executions> <execution> <phase>package</phase> <goals>
|
||||
<goal>shade</goal> </goals> <configuration> <transformers> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||
<mainClass>us.tastybento.bskyblock.BSkyBlock</mainClass> </transformer> </transformers>
|
||||
<mainClass>world.bentobox.bbox.BSkyBlock</mainClass> </transformer> </transformers>
|
||||
</configuration> </execution> </executions> </plugin> -->
|
||||
<!-- I'm going to comment out these sections for now to speed up compilation
|
||||
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId>
|
||||
<version>3.0.1</version> <executions> <execution> <id>attach-sources</id>
|
||||
<goals> <goal>jar-no-fork</goal> </goals> </execution> </executions> </plugin>
|
||||
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.0.0</version> <configuration> <additionalJOption>-Xdoclint:none</additionalJOption>
|
||||
</configuration> <executions> <execution> <id>attach-javadocs</id> <goals>
|
||||
<goal>jar</goal> </goals> </execution> </executions> </plugin> -->
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>3.0.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<goals>
|
||||
<goal>jar-no-fork</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<configuration>
|
||||
<additionalJOption>-Xdoclint:none</additionalJOption>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-javadocs</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
@ -180,4 +201,5 @@
|
||||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<version>1.0</version>
|
||||
</project>
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -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<String> 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);
|
||||
}
|
||||
|
||||
}
|
@ -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<String> 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;
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
package us.tastybento.bskyblock.commands.island;
|
||||
|
||||
public class IslandInfoCommand {
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
package us.tastybento.bskyblock.commands.island;
|
||||
|
||||
public class IslandSpawnCommand {
|
||||
}
|
@ -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()));
|
||||
}
|
||||
|
||||
}
|
@ -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<BlockPopulator> 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;
|
||||
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
package us.tastybento.bskyblock;
|
||||
package world.bentobox.bbox;
|
||||
|
||||
/**
|
||||
* Contains the plugin constants.
|
@ -1,4 +1,4 @@
|
||||
package us.tastybento.bskyblock;
|
||||
package world.bentobox.bbox;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.DataOutputStream;
|
614
src/main/java/world/bentobox/bbox/Settings.java
Normal file
614
src/main/java/world/bentobox/bbox/Settings.java
Normal file
@ -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<String> 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<String, Integer> 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<String> 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<String> 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<String, Integer> getCustomRanks() {
|
||||
return customRanks;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param customRanks the customRanks to set
|
||||
*/
|
||||
public void setCustomRanks(Map<String, Integer> 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
|
||||
|
||||
|
||||
}
|
@ -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());
|
||||
}
|
||||
|
||||
/**
|
@ -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");
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
package us.tastybento.bskyblock.api.addons;
|
||||
package world.bentobox.bbox.api.addons;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
@ -1,4 +1,4 @@
|
||||
package us.tastybento.bskyblock.api.addons;
|
||||
package world.bentobox.bbox.api.addons;
|
||||
|
||||
public interface AddonInterface {
|
||||
void onEnable();
|
@ -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}.
|
@ -1,4 +1,4 @@
|
||||
package us.tastybento.bskyblock.api.addons.exception;
|
||||
package world.bentobox.bbox.api.addons.exception;
|
||||
|
||||
public abstract class AddonException extends Exception {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package us.tastybento.bskyblock.api.addons.exception;
|
||||
package world.bentobox.bbox.api.addons.exception;
|
||||
|
||||
import java.util.logging.Level;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package us.tastybento.bskyblock.api.addons.exception;
|
||||
package world.bentobox.bbox.api.addons.exception;
|
||||
|
||||
public class InvalidAddonInheritException extends AddonException {
|
||||
|
@ -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
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
@ -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<T> {
|
||||
private Logger logger;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public BSBConfig(BSkyBlock plugin, Class<T> type) {
|
||||
public BSBConfig(BentoBox plugin, Class<T> type) {
|
||||
this.logger = plugin.getLogger();
|
||||
handler = (AbstractDatabaseHandler<T>) new FlatFileDatabase().getHandler(type);
|
||||
}
|
@ -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;
|
@ -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;
|
||||
|
||||
/**
|
||||
*
|
@ -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;
|
@ -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();
|
||||
}
|
@ -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 {}
|
@ -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;
|
||||
|
||||
/**
|
||||
*
|
@ -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;
|
@ -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
|
@ -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 {
|
||||
|
@ -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.
|
@ -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
|
@ -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.
|
@ -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.
|
@ -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.
|
@ -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.
|
@ -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
|
||||
*/
|
@ -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<Flag> {
|
||||
|
||||
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<Flag> {
|
||||
*/
|
||||
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<Flag> {
|
||||
*/
|
||||
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<Flag> {
|
||||
* @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))
|
@ -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
|
||||
*/
|
@ -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;
|
||||
|
||||
/**
|
@ -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
|
@ -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
|
@ -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;
|
||||
|
@ -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.
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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;
|
@ -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;
|
@ -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
|
@ -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
|
@ -1,4 +1,4 @@
|
||||
package us.tastybento.bskyblock.api.placeholders;
|
||||
package world.bentobox.bbox.api.placeholders;
|
||||
|
||||
public class PlaceholderBuilder {
|
||||
|
@ -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,7 +13,7 @@ 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() {}
|
||||
@ -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<PlaceholderAPIInterface> it = apis.iterator();
|
||||
while (it.hasNext()) {
|
||||
PlaceholderAPIInterface api = it.next();
|
@ -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.
|
||||
}
|
||||
|
@ -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;
|
@ -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;
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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,9 +32,6 @@ 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<String> args) {
|
||||
if (args.size() != 1) {
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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<String> args) {
|
||||
return true;
|
@ -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<UUID, Clipboard> clipboards;
|
@ -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,9 +29,6 @@ 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<String> args) {
|
||||
if (args.size() != 2) {
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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
|
@ -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
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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.
|
@ -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<String> 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("");
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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<String> args) {
|
||||
if (getIslands().hasIsland(getWorld(), user.getUniqueId())) {
|
@ -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<String> args) {
|
||||
if (getIslands().getIsland(getWorld(), user.getUniqueId()) == null) {
|
@ -0,0 +1,4 @@
|
||||
package world.bentobox.bbox.commands.island;
|
||||
|
||||
public class IslandInfoCommand {
|
||||
}
|
@ -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<String> args) {
|
||||
LanguagePanel.openPanel(user);
|
@ -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));
|
||||
}
|
||||
}
|
@ -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<String> args) {
|
||||
UUID playerUUID = user.getUniqueId();
|
@ -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;
|
@ -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<String> args) {
|
||||
UUID playerUUID = user.getUniqueId();
|
@ -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<String> args) {
|
||||
// Settings are only shown if you are in the right world
|
@ -0,0 +1,4 @@
|
||||
package world.bentobox.bbox.commands.island;
|
||||
|
||||
public class IslandSpawnCommand {
|
||||
}
|
@ -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 {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user