Commit Graph

1224 Commits

Author SHA1 Message Date
tastybento
7bd86c30b5 Fixed bugs and tests. 2018-10-12 16:42:15 -07:00
tastybento
e89cdb8d6a WIP: Added admin why command. 2018-10-12 16:19:21 -07:00
tastybento
0020cbf849 WIP: Tracks why flag actions allowed or not
This idea is to add a "why" command for admins that will reveal why a
player can do something. I want admins to be able to understand this
better so that they can give us better bug reports or fix it themselves.

We have good error messages for players for when they can do something
via the Island Protected text, but it would be useful to have the
opposite too, i.e., an explanation for why a player was able to break
blocks.

The approach here is that an admin would do "/bsbadmin why <playername>"
to turn on tracking. Then when the player did something, it would be
reported in the console.

This commit just has enums set, but I'm going to work on a notification
system next.
2018-10-12 08:14:08 -07:00
tastybento
14b7a3aa82 Fixed teleporting to an island by using a member's name
https://github.com/BentoBoxWorld/bentobox/issues/300
2018-10-07 18:15:18 -07:00
Florian CUNY
a6d25d68a9
Only count death if it is enabled for this world
#164
2018-10-07 10:35:15 +02:00
Florian CUNY
87c54aaf08
Added #isDeathsCounted() in WorldSettings
#164
2018-10-07 10:24:22 +02:00
tastybento
7515b39583 Shows plugin version in version command.
https://github.com/BentoBoxWorld/bentobox/issues/285
2018-10-05 17:57:11 -07:00
tastybento
b83e5d4a56 Fixed tests for Invincible visitors. 2018-10-05 17:34:21 -07:00
tastybento
5039980693 Fix to avoid null colors
https://github.com/BentoBoxWorld/bentobox/issues/293
2018-10-05 17:19:51 -07:00
tastybento
a49739d45a Fix for dying in the void in non-island location causes spectator mode.
https://github.com/BentoBoxWorld/bentobox/issues/286
2018-10-05 17:18:18 -07:00
tastybento
0f5ab8ab7d Added inWorld(World.class) to IWM
This had a ripple affect through the tests because now there are two
inWorld() methods - one for Location and one for World.
2018-09-29 09:01:20 -07:00
Florian CUNY
f110aedc69 Few fixes to AddonClassLoader
Related to #280

Added handling for NoClassDefFoundError
"Grammatically" fixed a few exception messages
2018-09-29 15:01:45 +02:00
tastybento
2df049f70d Implements protection for standard Nether and End
This was missing so it needed to be added.

Related to: https://github.com/BentoBoxWorld/addon-bskyblock/issues/9
2018-09-25 22:20:30 -07:00
tastybento
1f1b446137 Fixed standard Nether portal use 2018-09-25 21:20:09 -07:00
tastybento
86d40ca126 Fixed issue where standard Nether is protected.
Also applies to standard End.

https://github.com/BentoBoxWorld/addon-bskyblock/issues/9
2018-09-25 20:45:43 -07:00
tastybento
0f371f4800 Removed unneeded imports and code. 2018-09-25 20:05:23 -07:00
Florian CUNY
3d924c9ffc
Merge pull request #260 from BentoBoxWorld/schem-command-improvements
Schem command improvements
2018-09-23 22:58:10 +02:00
Florian CUNY
58de346dc9 Various changes to SafeSpotTeleport
* Replaced SafeTeleportBuilder by SafeSpotTeleport.Builder
* Added "overrideGamemode" parameter
* AdminTeleportCommand no longer overrides the player's gamemode when teleporting (fixes #262 )
2018-09-15 12:38:51 +02:00
Florian CUNY
5db4866cb6 Moved HeadGetter and HeadRequester to util/heads package 2018-09-15 12:17:58 +02:00
Florian CUNY
1f93a7f085 Moved YmlCommentParser and YmlConfiguration to util/yaml package 2018-09-15 12:17:27 +02:00
Florian CUNY
edd64d2f30 Moved AddonState in Addon.State 2018-09-15 12:11:23 +02:00
Florian CUNY
2eb46b0c2c Fixed some code smells 2018-09-15 11:37:56 +02:00
Florian CUNY
102ad864e1 Simplified condition in IslandCreateEvent 2018-09-15 10:44:04 +02:00
Florian CUNY
02be048192 Removed "general.errors.unknown-player-name" : added a "[name]" textvariable in "general.errors.unknown-player"
Closes #263
2018-09-15 10:39:16 +02:00
Florian CUNY
918f6de782 Fixed clicking outside of inventory closing it
I edited it so it only happens on BentoBox's panels. Having it closing "every" inventory was causing issues with vanilla inventories (crafting table, etc...)

I could not fix the related tests though : PanelListenerManagerTest#testOnInventoryClickOutside (PanelListenerManagerTest.java:128) is failing every time.
2018-09-08 17:12:15 +02:00
Florian CUNY
cf11c1b9c1 Use ConfirmableCommand#askConfirmation(User, String, Runnable) in AdminSchemSaveCommand 2018-09-03 15:55:00 +02:00
Florian CUNY
a7d001d578 Added User#spawnParticle(Particle, Particle.DustOptions, int, int, int) 2018-09-03 15:53:16 +02:00
Florian CUNY
1c24619450 Merge remote-tracking branch 'origin/develop' into schem-command-improvements 2018-09-03 15:42:57 +02:00
Florian CUNY
cc6aaa1fd1
Merge pull request #261 from BentoBoxWorld/pvp-notify
Use User#notify() instead of #sendMessage() in PVPListener
2018-09-03 10:16:29 +02:00
tastybento
505624b45c Fixes tests. Also fixes a bug.
https://github.com/BentoBoxWorld/bentobox/issues/258
2018-09-02 20:45:31 -07:00
Florian CUNY
c039b9e13c
Merge pull request #259 from BentoBoxWorld/fix-unknown
Fixed players considered "unknown" until they create an island
2018-09-02 21:39:29 +02:00
Florian CUNY
ee9c7937ea Use User#notify() instead of #sendMessage() in PVPListener 2018-09-02 17:25:15 +02:00
Florian CUNY
fbf88483f0 Added trust and coop cooldown in config instead of using the invite cooldown for /is team coop and /is team trust 2018-09-02 15:06:46 +02:00
Florian CUNY
e5cc56b919 Added #askConfirmation(User, String, Runnable) in ConfirmableCommand
This can allow the command to give a bit more context about the confirmation request.
ConfirmableCommand#askConfirmation(User, Runnable) can still be used.
2018-09-02 11:55:26 +02:00
Florian CUNY
e380860b23 Splited AdminSchemCommand in various sub commands
Locale needs to be updated.
2018-09-02 11:13:58 +02:00
Florian CUNY
ffe1363c48 Fixed typo in SchemsManager 2018-09-02 11:10:20 +02:00
Florian CUNY
97222808ac Fixed players considered "unknown" until they create an island 2018-09-02 08:50:40 +02:00
Florian CUNY
5ad363ca11 Fixed weird header display in Settings Panel 2018-09-01 17:38:54 +02:00
Florian CUNY
d05582fd79 Fixed Panels size that could be higher than 54 2018-09-01 17:38:36 +02:00
Florian CUNY
8e7843de82 Made Notifier.Notification private
External plugins/addons shouldn't have had access to this inner class.
2018-09-01 14:30:25 +02:00
Florian CUNY
678e699f1d Fixed Enter/Exit messages spam introduced in 343a789d95
Fixes #253
2018-09-01 14:29:45 +02:00
Florian CUNY
279dc6fbd8 Fixed weird stained glass pane display in SettingsPanel 2018-08-31 21:09:01 +02:00
Florian CUNY
ea1fea66ff Fixed Invincible Visitors still using "general.errors.you-need". 2018-08-31 21:06:18 +02:00
Florian CUNY
63e004415b Fixed Flag.Type.WORLD_SETTING to use GRASS_BLOCK instead of GRASS 2018-08-31 21:04:24 +02:00
Florian CUNY
343a789d95 Fixed Enter/Exit messages not being sent when the player teleports to the island 2018-08-31 20:58:47 +02:00
Florian CUNY
4b9e8f1e0e Fixed NPE when an invite gets rejected 2018-08-31 20:46:53 +02:00
Florian CUNY
07547472b8
Fixed color general.errors.no-permission in en-US 2018-08-31 20:17:41 +02:00
Florian CUNY
b2c1102b9f
Merge pull request #250 from BentoBoxWorld/java10
Java 10 Compatibility
2018-08-31 20:01:46 +02:00
tastybento
4c3ddc8079 Put back in JavaDoc and Shade Plugin 2018-08-31 07:51:31 -07:00
tastybento
10db4230b0 Fixes compatibility issues with Java 10
Use non-deprecated methods still compatible with Java 8. These mostly
just propagate Exceptions up when instantiating constructors when using
the database functions.

Reverted POM back to Java 8 so that compiled code will work on Java 8 as
well.
2018-08-31 07:44:47 -07:00
Florian CUNY
24d783be24 Cleanup in Settings
Removed purge-related settings.
Renamed all database-related settings and methods to replace `db` with `database`.
Moved confirmationTime to `island.confirmation.time`.
Renamed inviteWait, banWait and resetWait to inviteCooldown, banCooldown, resetCooldown. Also moved them under `island.cooldown.x`.
Removed kickWait and leaveWait, using confirmationTime instead.
Moved `island.require-confirmation.<command>` to `island.confirmation.commands.<command>`.
Updated tests.
Updated getters and setters using code automation. Sadly, this wiped out all the Javadoc.
2018-08-31 11:06:37 +02:00
tastybento
95f8c81963 Switched to Java 10
Maven shade plugin and javadoc plugins have issues with Java 10 so those
are currently commented out.

BStats cannot work because shade plugin is not shading.

Shade plugin is fixed in snapshots, but not in Maven Central yet.
2018-08-30 21:44:56 -07:00
tastybento
4203ce85b4 Merge branch 'develop' of https://github.com/BentoBoxWorld/bentobox.git into develop 2018-08-31 10:49:56 +09:00
tastybento
4eadd259f7 Added PanelBuilderTest and fixed bug in PanelBuilder
nextSlot() was not giving next slot after an assigned slot.

11600ft and descending into SFO. 14 miles out.
2018-08-31 07:28:02 +09:00
Florian CUNY
1dfb46a2cd Changed island range particles to be gray redstone instead of TOWN_AURA 2018-08-30 23:54:44 +02:00
Florian CUNY
9b9031a009 Load Metrics only if it is set to true in config 2018-08-30 23:34:13 +02:00
Florian CUNY
3c00247eda Removed "general.check-updates" from config. Unused. 2018-08-30 23:33:52 +02:00
Florian CUNY
1e791f8497 Fix last login timestamp in Island#showInfo() being 0 due to how OfflinePlayer#getLastPlayed() works. 2018-08-30 23:28:50 +02:00
tastybento
0da7c0bb3c Fixed bug where panel size was incorrectly set.
Slot position is not the same as size. Size is slot + 1.
2018-08-31 05:45:18 +09:00
tastybento
06f7b754b7 Removed enderman death drop flag. 1.13 drops blocks anyway. 2018-08-25 12:27:21 -07:00
tastybento
cdbceeb241 Fixed ranks manager removeRank code 2018-08-25 12:26:34 -07:00
tastybento
ff909cf8a6 addRank or removeRank could remove trust, coop and sub_owner ranks 2018-08-25 11:30:26 -07:00
tastybento
b9c2756094 Added protection from falling damage when new island made
Also sets player's velocity in all directions to zero.
2018-08-25 11:29:24 -07:00
tastybento
3a5908ec98 Added protection against breaking to items that are protected from use
https://github.com/BentoBoxWorld/addon-bskyblock/issues/5
2018-08-25 11:28:54 -07:00
tastybento
633007630d Fixed issue where settings.* permission was not working 2018-08-25 11:28:06 -07:00
tastybento
474de77ce2 Added death listener.
Counts player deaths in any game world.

Fixes https://github.com/BentoBoxWorld/addon-level/issues/18
2018-08-22 23:46:24 -04:00
tastybento
9b1c7f10ab Added Clipboard test class and improved Clipboard robustness
Flight # 2533
RDU to PHX
Above Memphis, TN
Altitude
38,006 ft
Ground speed
464 mph
2018-08-22 18:40:44 -04:00
tastybento
8364da6e65 Fixed pasting of entities in schems. 2018-08-21 11:38:17 -07:00
tastybento
4ca73385ca Fix for commands stopping working after logout
https://github.com/BentoBoxWorld/bentobox/issues/239

The player must be removed from the User cache on logout because the
player object becomes stale and if the player logs in again, they will
still have the old player object.
2018-08-19 11:46:36 -07:00
tastybento
a82e8138c3 Fix for 1st time file saving. 2018-08-18 14:27:50 -07:00
tastybento
f844b9bb40 Fixed AdminDeleteCommand. 2018-08-18 10:39:07 -07:00
tastybento
9847235df1 Fixes MySQL exists and delete functions. 2018-08-18 09:53:21 -07:00
tastybento
46c1ff4761 Added support for softdepend command in addon.yml.
Addons can now be sure to be loaded after others that may or may not
exist.
2018-08-17 21:58:11 -07:00
tastybento
9adabc4fb2 Added support for depend in addon.yml
This enables add-ons that must load after another addon to mark it in
the depend line of addon.yml
2018-08-17 21:09:19 -07:00
tastybento
f152d218fc Removed entity and tile limit settings from world settings
The functionality of limiting certain entities or tile entities can be
provided by an addon instead.
2018-08-17 17:42:57 -07:00
tastybento
3ebbcd87e8 Reworked POM to fix shading in of BStats. 2018-08-16 19:00:01 -07:00
tastybento
e959a04091 Merge branch 'develop' of https://github.com/BentoBoxWorld/bentobox.git into develop 2018-08-16 15:53:02 -07:00
tastybento
b80928184e Fixed code smells. 2018-08-16 15:52:23 -07:00
Florian CUNY
7b3b1303b4 Removed the current Placeholders API (it is unused) 2018-08-16 21:35:10 +02:00
tastybento
471cb30a87 Removed unused imports. 2018-08-16 11:06:18 -07:00
tastybento
5740ad7e0c
Merge pull request #238 from BentoBoxWorld/enter-exit-listener
Updated EnterExitListener to fire IslandEnterEvent and IslandExitEvent
2018-08-16 11:03:55 -07:00
tastybento
ec005569a1 Fixed tests for EnterExitListenerTest 2018-08-16 10:38:35 -07:00
Florian CUNY
4c319dd0e0 Shaded bStats' Metrics
Also removed custom metrics for the moment.
This will later be used to allow addons to register their own metrics :)
2018-08-16 13:49:44 +02:00
Florian CUNY
bd2cc1b63e Updated EnterExitListener to fire IslandEnterEvent and IslandExitEvent 2018-08-16 11:15:36 +02:00
Florian CUNY
d04b286055 Removed obsolete from locales 2018-08-16 10:49:57 +02:00
tastybento
5a38c0b5e0 Fixes bugs with copy file method. 2018-08-16 00:15:14 -07:00
tastybento
e12eb85bce Added Japanese locale and fixed US locale typos 2018-08-15 23:50:01 -07:00
tastybento
3d069910f9 Added colors to english locale 2018-08-15 21:08:50 -07:00
tastybento
382b47abbf Adjusted event priorities to stop console spam for island lock or ban
Changed enter-exit messages to notify
2018-08-15 21:01:00 -07:00
tastybento
22121ad4f9 Fixed bug with sub command getAddon() inheritance. 2018-08-15 20:50:02 -07:00
tastybento
5981ffa0d5 Removed unused InventorySave/Store classes. 2018-08-15 20:30:50 -07:00
tastybento
68624d2879 Removed unused imports. Removed unused classes InventorySave/Store 2018-08-15 20:30:34 -07:00
tastybento
8a687a52c6 Fix for saving config files in Windows. 2018-08-15 13:53:07 -07:00
Florian CUNY
6358f72986 Fixed some code smells 2018-08-15 11:01:07 +02:00
Florian CUNY
7815c837dd Deleted FlyingMobEvents (duplicate of GeoLimitMobs)
And also fixed a code smell with metrics method names in IslandsManager
2018-08-15 10:52:10 +02:00
Florian CUNY
0a0d66eebf Fix for the two last revert commits. 2018-08-15 09:58:01 +02:00
Florian CUNY
bce73a551d Revert "Rewrote IslandGrid to use Table<> from Guava"
This reverts commit b54c7ad662.
2018-08-15 09:53:25 +02:00
Florian CUNY
82ebc8b018 Revert "Fixed IslandCacheTest"
This reverts commit 8fb4e58994.
2018-08-15 09:51:41 +02:00
Florian CUNY
d926873992 Revert "Rewrote IslandGrid.Cell"
This reverts commit bfff61e6a1.
2018-08-15 09:51:12 +02:00
Florian CUNY
f12773475b Made DatabaseSetup an interface 2018-08-15 09:44:04 +02:00
Florian CUNY
539d2a0516 Fixed some code smells 2018-08-15 09:43:28 +02:00
tastybento
fc066a04a3 Added SuppressWarnings to classes using deprecated regenerateChunk 2018-08-14 19:09:14 -07:00
tastybento
baf6571614 Added comments and TODO's to FlatFileDatabaseHandler 2018-08-14 18:43:51 -07:00
Florian CUNY
e11f173ca3 Made /is reset use the command cooldown API + switched "wait" settings to int
Aaaand had to update some tests. Lots of tests.
2018-08-14 21:11:46 +02:00
Florian CUNY
bfff61e6a1 Rewrote IslandGrid.Cell
Removed CellState.RESERVED for now
Made the Object an Island for now
Validate#notNull() in constructor
Made state and island variables final

Also updated the filters
2018-08-14 20:49:05 +02:00
tastybento
3118da2216 Added comments to FlatFileDatabaseHandler
WIP
2018-08-14 08:53:44 -07:00
tastybento
67d40462bc Code clean up.
Removed commodore for now.
Simplified some return statements.
2018-08-14 08:24:28 -07:00
tastybento
653e94e0b7 Made sub-class of CompositeCommand called ConfirmableCommand
This class inherits CompositeCommand and adds the confirming system.

It could be renamed Confirmable, like Bukkit has Cancellable for Events.
2018-08-14 11:43:21 +02:00
Florian CUNY
8fb4e58994 Fixed IslandCacheTest
Also commented out CellState.RESERVED.

That was a tough one. I had to rewrite IslandGrid#getIslandAt(int, int) quite a few times before using the stream() thing. I tested it a bit - it seems it is working like a charm.
I just hope that it won't be something useless - another plumbing change that adds nothing. It shouldn't - because of the "RESERVED" thing - but, well... it's been quite a hard thing!
2018-08-14 11:38:44 +02:00
tastybento
9367f41e72 Removed permission from BentoBox version command. 2018-08-13 20:05:16 -07:00
Florian CUNY
b54c7ad662 Rewrote IslandGrid to use Table<> from Guava
It also prepares further implementation for reserved "locations"
2018-08-13 21:45:43 +02:00
Florian CUNY
3ff387121a Minor javadoc edit in Island 2018-08-13 21:05:58 +02:00
Florian CUNY
9d04aa376b Cleanup in CompositeCommand
Removed onlyConsole
Removed "showHelp" implementation
Removed deprecated setParameters
2018-08-13 21:03:24 +02:00
Florian CUNY
353c87cf6d Fixed EnterExitListener to support non-set Island's name
When an Island's name was reset (set to `null`) it was breaking EnterExitListener.
2018-08-13 16:08:05 +02:00
tastybento
ec3e956d76 Enforced onlyConsole setting.
Removed extraneous test code method
2018-08-12 20:09:04 -07:00
tastybento
4681a0bd7d Added BentoBox reload command
Only reloads locales for now.
2018-08-12 19:52:13 -07:00
tastybento
94c5ac8e79 Fixed bug with loading add-on with no locales.
Fixed bug with no permission error in click listeners.
2018-08-12 18:53:56 -07:00
tastybento
6eeff3f383 Added test classes for coop, uncoop, trust and untrust commands. 2018-08-12 17:15:11 -07:00
tastybento
c1a6a233a9 Added team coop, uncoop, trust and untrust commands. 2018-08-12 16:43:47 -07:00
tastybento
82c35f9aa9 Fixed test breaks. 2018-08-12 14:28:25 -07:00
tastybento
67dc4eedb3 Merge remote-tracking branch 'origin/develop' into command_ranks 2018-08-12 13:46:01 -07:00
Florian CUNY
7ec497a93b Fixed general.errors.no-permission being sent twice 2018-08-12 18:50:12 +02:00
Florian CUNY
3212b7180d Changed a few locale references for consistency
Removed `general.errors.you-need` to put the [permission] variable in the `general.errors.no-permission`.
Renamed all confirmation-related references to `commands.confirmation.xxx`.
Renamed `protection.panel.flag-item.xxx_rank` to use a dash instead of an underscore.
2018-08-12 18:47:31 +02:00
tastybento
ca4db42e8d Fixed bug with locale files being saved from BentoBox into addon locales 2018-08-12 08:02:54 -07:00
tastybento
686b4398bc Merge remote-tracking branch 'origin/develop' into command_ranks 2018-08-12 07:59:13 -07:00
Florian CUNY
2fee163818 Fixed default description and parametersHelp (again)
Commit efb8cb27a9 broke it
2018-08-12 11:38:09 +02:00
Florian CUNY
5b7502d83f Fixed minor code smells 2018-08-12 11:28:36 +02:00
Florian CUNY
20116ff287 Changed the main package declaration restriction to be 'world.bentobox.bentobox'
It will allow us to create our addons using a "conventional" package naming, such as "world.bentobox.bskyblock", etc...
2018-08-12 11:01:40 +02:00
tastybento
d44889e7b0 Added command rank settings and extra ranks. 2018-08-11 21:08:04 -07:00
tastybento
203998d000 Made toLowerCase / toUpperCase use an explicit Locale
This avoids issues on some OS's.

Put in Commodore (but commented out). Just checking it out.
2018-08-12 05:12:14 +09:00
tastybento
bcb44c4cce Fixed PlayerManager tests. 2018-08-12 04:14:07 +09:00
tastybento
7e7001e99b Fixes UUID lookup
https://github.com/BentoBoxWorld/bentobox/issues/232
2018-08-12 02:47:38 +09:00
tastybento
efb8cb27a9 Merge branch 'develop' of https://github.com/BentoBoxWorld/bentobox.git
into develop

Conflicts:
	src/main/java/world/bentobox/bentobox/api/commands/CompositeCommand.java

	Fixed.
2018-08-12 02:44:39 +09:00
tastybento
0a65d7a8cc Added constructor to enable addon object passing. 2018-08-12 02:42:11 +09:00
Florian CUNY
8895cbf1a8 Updated locale references in BentoBoxVersionCommand 2018-08-11 16:05:02 +02:00
Florian CUNY
406441fc1e Version FC-0.92 2018-08-11 15:12:42 +02:00
Florian CUNY
d58570330a Fixed default parameters and description in CompositeCommand
Also accordingly updated the related javadoc.
2018-08-11 14:29:42 +02:00
Florian CUNY
8749566279 Minor variable-renaming in User 2018-08-11 14:07:46 +02:00
Florian CUNY
d73539f755 Fixed default help not sending description reference if no translation was found 2018-08-11 14:07:26 +02:00
Florian CUNY
1c2e553e9f Updated BentoBoxCommand 2018-08-11 14:06:49 +02:00
Florian CUNY
3d441928d0 Renamed AboutCommand to BentoBoxAboutCommand 2018-08-11 14:05:33 +02:00
Florian CUNY
699b439096 Renamed VersionCommand to BentoBoxVersionCommand 2018-08-11 14:05:12 +02:00
Florian CUNY
2f01671f72 Actually removed Constants class 2018-08-11 14:04:53 +02:00
Florian CUNY
f89bda6b5d Replaced #setParameters(String) by #setParametersHelp(String) in commands 2018-08-11 13:33:42 +02:00
tastybento
6ee5538930 Fixed help.
Usage is not translatable - it's a chained list of commands.
2018-08-10 14:59:13 +09:00
tastybento
46ae5883a1 Revert "Commented out the default description and parameter help for now."
This reverts commit f3442a32ab.
2018-08-10 14:57:18 +09:00
tastybento
f3442a32ab Commented out the default description and parameter help for now.
Let's discuss how to approach this better.
2018-08-10 13:59:38 +09:00
tastybento
67ab937b97 Revert "Removed useless #setDescription() and #setParameters() in commands"
This reverts commit 0e8e9dde67.
2018-08-10 13:47:58 +09:00
Florian CUNY
48b169537a Prepared automated showHelp if #execute() was returning false
I added the code, however I commented it out: there are a few problems with this for now, because some commands are using "return false;" to fail silently.

Also did javadoc'd #onlyPlayer(boolean)
2018-08-09 17:09:38 +02:00
Florian CUNY
ceb88d9c7b Improved Javadoc in BentoBoxCommand interface 2018-08-09 17:07:53 +02:00
Florian CUNY
1155549e4c Typo in comments in IslandEvent 2018-08-09 16:40:35 +02:00
Florian CUNY
5ae88349b4 Removed purge-related events (unused) 2018-08-09 16:40:21 +02:00
Florian CUNY
716495258c Replaced #setParameters(String) to #setParametersHelp(String) in CustomIslandMultiHomeHelp 2018-08-09 11:56:38 +02:00
Florian CUNY
0e8e9dde67 Removed useless #setDescription() and #setParameters() in commands 2018-08-09 11:56:05 +02:00
Florian CUNY
a9a932fdc3 Deprecated #setParameters(String) in favor of #setParametersHelp(String)
Also did Javadoc for #setParameters(String), #setParametersHelp(String),
#setDescription(String) (I had to override this one).
2018-08-09 11:54:48 +02:00
Florian CUNY
6d5518e97c Javadoc in PremadeEvent 2018-08-09 11:53:05 +02:00
tastybento
ea0f64a770 WIP added AdminDeleteCommand 2018-08-09 05:13:54 +09:00
tastybento
d630c0d739 WIP - needs test class and testing 2018-08-08 13:05:12 +09:00
tastybento
8b2ed9c7af Added convenience methods to TeamMakeLeaderEvent
Gives old owner and new owner UUIDs.

https://github.com/BentoBoxWorld/bentobox/issues/227
2018-08-07 18:51:23 -07:00
Florian CUNY
aab7d4a649 Made mod bypass permissions flags-specific & differenciated between everywhere and only on island
This is a 2 in 1 : #70 and #139.
Those were long-awaited features. Now it's time for testing !
2018-08-07 16:42:47 +02:00
Florian CUNY
1455d6e7f5 Locales : added meta.banner, meta.auhors and meta.version 2018-08-07 16:26:37 +02:00
Florian CUNY
90a868bc40 Updated ItemParser to use the new banner materials 2018-08-07 16:02:29 +02:00
Florian CUNY
7d04d8acc2 Renamed /bbox info to /bbox version 2018-08-07 10:43:38 +02:00
Florian CUNY
2e75c8b4b4 Removed IslandSpawnCommand (unused) 2018-08-06 18:01:00 +02:00
Florian CUNY
16e864f495 Fixed some code smells 2018-08-06 18:00:47 +02:00
Florian CUNY
28cf3ca278 Removed unused settings from Settings
recoverSuperFlat (is a flag) and muteDeathMessages (an external plugin can do it)
2018-08-06 16:08:45 +02:00
Florian CUNY
e22cdf0b36 Made Config use ConfigHandler instead of FlatFileDatabaseHandler 2018-08-06 15:59:38 +02:00
Florian CUNY
7f0dc2f6d3 Prepared handling of the other ConfigEntry fields for Config loading 2018-08-06 15:59:06 +02:00
Florian CUNY
cfbf3df1c3 BREAKING: Renamed [...]DatabaseConnecter to [...]DatabaseConnector
It was a typo shown by IntelliJ
2018-08-06 15:32:15 +02:00
Florian CUNY
5fa8f3997f BREAKING: Renamed a few API classes to a more generic name
`BBConfig` to `Config`.
`BBDatabase` to `Database`.
`BBDbSetup` to `DatabaseSetup`.

Sorry @tastybento, hope it won't bother you too much :/
2018-08-06 15:19:06 +02:00
tastybento
ba557a1068 API Breaker: renamed BSB classes to be just BB
Hopefully, this is the last API breaker. I renamed the classes that
started with BSB to be just BB (bentobox). I now have to fix all the
add-ons I just broke...
2018-08-05 20:08:03 -07:00
tastybento
cfdabbb176 Removed AboutCommand test to get a clean build.
Please see my comment on the commit. Final classes can't be mocked (as
far as I know) so it's kinda impossible to make a test for this one.
2018-08-05 20:00:23 -07:00
Florian CUNY
f8366cafec Started a test unit for AboutCommand 2018-08-05 10:56:15 +02:00
tastybento
765268aa25 Code cleanup using Intellij 2018-08-04 21:50:10 -07:00
tastybento
492a0b9105 Added ban/unban cooldown 2018-08-04 21:10:51 -07:00
tastybento
1256b0ee22 Added a bentobox command
Added reference about and info commands. These command run across worlds
and currently have no perms associated with them.

The main point was to enable BentoBox to have is own commands.
2018-08-04 20:43:38 -07:00
tastybento
783caf985f Added generic cooldown methods to CompositeCommand
This API enables any command to have a cool down and to have that cool
down called by another command. For example, the Kick command sets the
cool down on the Invite command. It is possible for commands to set cool
downs on themselves too.
Currently, cool downs are not stored persistently in the database so
they disappear if the server is reloaded. This should be okay for now.
2018-08-04 18:45:13 -07:00
tastybento
2cc6d36997 Reworked test classes for managers
There are some weird NPE's that I couldn't work out in the test classes.
They do not occur when the class is run by itself, only when it is run
with all the others so I don't know why it is happening.
2018-08-04 10:13:08 -07:00
tastybento
25164d824b Rewrote IslandsManager test class 2018-08-04 09:37:21 -07:00
tastybento
08604fc27d Rewrote PlayersManagerTest class 2018-08-04 09:21:24 -07:00
tastybento
93c3d3ce47 Removed code smells. 2018-08-03 23:31:02 -07:00
tastybento
5c46265771 Fixed code smells. 2018-08-03 21:30:06 -07:00
tastybento
683aca7043 Adjusted Clipboard to remove code smell and renamed package 2018-08-03 21:19:15 -07:00
tastybento
1c29dfca6b Removed generic wildcard type code smell 2018-08-03 21:02:55 -07:00
tastybento
53f28eb68d Changed island team kick to use confirm API
Fix for:
https://github.com/BentoBoxWorld/bentobox/issues/214
2018-08-03 19:22:35 -07:00
tastybento
bad870d3da Reapplied commit to improve Maven.
Fixed test class failure.
2018-08-03 19:10:09 -07:00
tastybento
7aa2f33eab Put default settings for command desc and parameters back in
These should work now. No infinite loop.
2018-08-03 17:43:42 -07:00
tastybento
3e7307a56c Merge branch 'master' into develop 2018-08-03 08:25:40 -07:00
tastybento
48883bb75f Removed constants class for now. It's not needed. 2018-08-03 08:24:40 -07:00
tastybento
4d4c8da912 Revert "Maven cleanup, fix readme links"
This reverts commit 450786aea3.
2018-08-03 08:06:28 -07:00
tastybento
5d27ea8fc6 Fixed spawners in schems. 2018-08-02 20:39:57 -07:00
tastybento
3c74ef0694 Moved admin and island commands into API package 2018-08-02 19:26:46 -07:00
tastybento
4a1dede795 Removed deprecated calls from IslandsManager for trapdoor check 2018-08-02 19:01:23 -07:00
tastybento
d3b5411b1b Fix for tab complete in game. 2018-08-02 18:39:10 -07:00
Gabriele C
450786aea3 Maven cleanup, fix readme links 2018-08-02 23:00:58 +02:00
tastybento
02e528cdc7 Debug 2018-08-02 08:11:46 -07:00
tastybento
2d75a92700 Fixed 1.13 schems 2018-08-01 22:02:53 -07:00
tastybento
ae3a341b89 WIP - using blockdata - doesn't work completely yet. 2018-08-01 17:24:52 -07:00
tastybento
acbcd27142 Temporary fix for island schem pasting.
Note that blocks are not pasted properly. The Clipboard class needs
rewriting to 1.13.
2018-08-01 16:40:21 -07:00
tastybento
a9da00478d Fixed EndermanListenerTest class to use BlockData properly. 2018-08-01 18:19:47 -04:00
tastybento
733fc3d1c9 Fixed Endermen listener for 1.13 2018-08-01 09:35:31 -07:00
tastybento
4fab167d10 Fixed build errors.
Reverted back the generic commands for use by addons.

WIP - some tests need fixing for 1.13.
2018-08-01 08:55:48 -07:00
tastybento
422fd7b0e8 Revert "Removed /is and /bsbadmin commands"
This reverts commit c6e2ba6418.
2018-08-01 08:29:09 -07:00
Florian CUNY
e6418f0957 Finished updating source code to 1.13 API
Test units still need to be updated.
2018-08-01 11:03:03 +02:00
Florian CUNY
1a63b2431e CompositeCommand : added defaults for setDescription and setParameters 2018-08-01 10:36:38 +02:00
Florian CUNY
b600dacbdd Continued 1.13 support 2018-08-01 10:18:37 +02:00
Florian CUNY
c6e2ba6418 Removed /is and /bsbadmin commands 2018-08-01 10:16:57 +02:00
Florian CUNY
46f22e5467 WIP - Updating to full 1.13. Will not build. 2018-07-31 21:17:10 +02:00
Florian CUNY
5fa0f590f1 Made TNT a PROTECTION flag instead of SETTING 2018-07-31 20:04:47 +02:00
Florian CUNY
84515642bf Removed GameType in Constants (useless) 2018-07-31 18:19:36 +02:00
Florian CUNY
2210cdc2e8 Javadoc and line spacing in BentoBox 2018-07-31 18:14:57 +02:00
Florian CUNY
3473fb48e6 Renamed 'world.bentobox.bbox' to 'world.bentobox.bentobox' 2018-07-31 18:03:32 +02:00
tastybento
c7ff1bbae4 Converted references of BSkyBlock to BentoBox 2018-07-29 17:09:48 -07:00
tastybento
f2831c7258 Improved addon loading error reporting
Fixed a bug in the team invite error strings.
2018-07-29 16:56:14 -07:00
tastybento
268a301a47 Switch to BentoBox 2018-07-29 13:21:46 -07:00
tastybento
da04246a50 Removed acid-related events. 2018-07-28 13:39:18 -07:00
Florian CUNY
96c68957c5 Added a better exception handling when loading locales 2018-07-28 10:15:36 +02:00
tastybento
9c41ceb5f2 Added clear resets and clear reset all admin commands.
Clear reset all uses a timestamp stored in config.yml. If a player logs
in and the last time they logged in was before that timestamp, then
their resets are cleared. Note that as opposed to ASkyBlock, the player
object stores the number of resets done for a world and not the number
of resets left. This is a better design because it means that admins can
change the max number  of resets and every player file does not have to
be adjusted.

Location of commit (30,000ft above Nevada desert, just coming into Las
Vegas).
2018-07-25 09:47:57 -07:00
tastybento
541ee35256 WIP - clear reset all command 2018-07-25 07:04:40 -07:00
tastybento
342387cf09 Adjusted to run in 1.13-pre7
Removed references to STATIONARY_WATER as this does not exist in 1.13.
2018-07-23 23:14:51 -07:00
tastybento
b40023bcf9 Added GeoLimit for mobs - world setting.
Adds a world menu for preventing mobs from exiting an island.
Defaults are for flying mobs.

Adds an event that is called when the plugin loads.

Test classes are still to be developed.
2018-07-22 16:17:34 -07:00
tastybento
944ab36488 Finished ItemFrameListener and test. 2018-07-21 21:48:22 -07:00
tastybento
984de1cd07 Added ItemFrame protection from mobs flag and test class. 2018-07-21 21:10:07 -07:00
tastybento
71e79db0a9 Added Enderman protection flags and tests. 2018-07-21 16:48:53 -07:00
tastybento
b72d1853b5 Added Range command tests and put in some locale messages. 2018-07-21 14:06:40 -07:00
Florian CUNY
f10c2da7d3 Code smells ; minor code format issues 2018-07-20 14:37:11 +02:00
tastybento
f8da453a29 Added chest damage listener
Also fixed a bug with creeper listener to only apply to island worlds.

Made TNT flag an island settings. Woohoo!
2018-07-19 19:55:32 -07:00
tastybento
c61b87628f Added view distance limit to range particles 2018-07-19 19:43:13 -07:00
tastybento
d4305efabe Removed place blocks debug 2018-07-19 19:28:50 -07:00
tastybento
acaf126978 Removed unused imports 2018-07-19 19:12:19 -07:00
Florian CUNY
e9d39148ef Removed useless Island#getTileEntityCount(Material, World) 2018-07-19 21:18:09 +02:00
Florian CUNY
e15ed63899 Added /bsb range reset <player> 2018-07-19 13:31:47 +02:00
Florian CUNY
a5a1ccb7e5 Fixed bug with protection range (in Island)
minX, minZ, minProtectedX and minProtectedZ are no longer variables : to get them, we have to use the related methods. As they get recalculated at each call, it ensures they follow the changes (especially with the protectionRange)
2018-07-19 12:58:59 +02:00
Florian CUNY
09c0eb846e /bsb range set : allow to set a value which is = to the max range 2018-07-19 12:55:47 +02:00
Florian CUNY
4df9f89e3e Fixed /bsb info not displaying the actual protectionRange 2018-07-19 12:45:02 +02:00
Florian CUNY
d75cc70083 Documented #getRange() and #setRange(int) in Island 2018-07-19 12:23:22 +02:00
Florian CUNY
b37df7ef7c Fixed some code smells in AdminGetRankCommand 2018-07-19 12:22:36 +02:00
Florian CUNY
90be5e5de6 Added /bsb range set <player> <range> 2018-07-19 12:22:01 +02:00
Florian CUNY
04db135f60 Added #getUser(UUID) in PlayersManager
I didn't find a real use right now, but that might be helpful for an addon etc
2018-07-19 12:21:31 +02:00
Florian CUNY
c693c32f30 /bsb range display : now 30 ticks instead of 20
Again, it is mainly to make it looks better and avoid having too much barrier particles when moving
2018-07-19 12:20:40 +02:00
Florian CUNY
918793fa43 /bsb range display : each 20 ticks instead of 15
BARRIER particles are lasting longer than the other ones. In order to avoid huge load of barrier icons (which becomes quite laggy very fast) in case the player is moving, I decided to slightly increase the amount of time between each zone-drawing.
2018-07-19 10:37:49 +02:00
tastybento
3b4aa2dd48 Fixed range display command to be just player only 2018-07-18 23:04:32 -07:00
tastybento
d093925938 Added text strings for localization. 2018-07-18 22:42:50 -07:00
tastybento
3210c7873b Fixes bug where boats could not be broken by the island owner 2018-07-18 22:28:03 -07:00
tastybento
0b77225f06 Fixed bug where Ops could not see admin help by default. 2018-07-18 21:28:15 -07:00
Florian CUNY
9920e31abb Added (finished) /bsb range <display/show/hide> 2018-07-18 22:28:50 +02:00
Florian CUNY
89b4b80208 Fixes an ArrayOutOfBoundsException when command was at "top" level 2018-07-18 15:49:05 +02:00
Florian CUNY
f8a7c1af48 Started /bsb range display 2018-07-18 15:37:20 +02:00
Florian CUNY
2e26c6a20c BREAKING CHANGE: now BSBCommand#execute(User, String, List<String>) !!! 2018-07-18 15:36:57 +02:00
Florian CUNY
0f61049502 Moved commands/island/teams to commands/island/team 2018-07-18 14:45:14 +02:00
Florian CUNY
fd36b0a9eb Renamed commands/admin/teams to commands/admin/team 2018-07-18 14:13:43 +02:00
Florian CUNY
66b33addfb Added convenience methods in CompositeCommand to ignore the Help subcommand if it exists
It might look useless at first, but it can have practical uses such as placeholders, display and so on.
It is also needed for my in-project new help display.
2018-07-18 13:46:40 +02:00
tastybento
d8f783999b Added creeper listener. Fixed bugs with listener reg. 2018-07-17 22:38:47 -07:00
tastybento
4f5b6a25b6 Renamed method to isWaterUnsafe to sound better. 2018-07-17 18:50:42 -07:00
tastybento
720e6bbe6b Added WaterIsNotSafe setting to WorldSettings
This flag is used to indicate whether being waste-deep in water is a
safe home location or not. On SkyBlock is it fine, on AcidIsland it is
not. So that's why this definition is required.

Removed unused @deprecation header. I assume switching to Spigot API
made these superfluous.
2018-07-17 18:48:50 -07:00
tastybento
b1a131fa84 Delay registering flag listeners until plugin is loaded.
Reworked test classes to avoid running the Bukkit server.
2018-07-17 18:32:28 -07:00
tastybento
ee440b4f0d Fix for null entities.
https://github.com/tastybento/bskyblock/issues/206
2018-07-17 07:54:22 -07:00
tastybento
5572875257 Added global TNT on/off flag
Protects against visitors priming TNT too.
Test class is just "happy path".

Fixed bugs with other flags around fire extinguish.
2018-07-16 19:00:12 -07:00
tastybento
65b656b95c Added a bit more info on super-flat chunk regen 2018-07-14 12:36:37 -07:00
tastybento
dedaebc2b6 Added setting in config for world difficulty.
Added ability to add comments to the top of the config file.
2018-07-14 12:29:59 -07:00
tastybento
ec0a6bdd73 Fixed issue with dots in map keys for YAML saving
YAML cannot handle dots in keys, so they need to be converted to
something else. I chose :dot:. This issue occurred because location
coordinates were saved with .'s in them. Actually, there is no
real value in saving such accurate locations, so in addition to
keeping the dot escape system (just in case), I changed locations
to just save as ints and then when they are loaded, x and z have
0.5D added to them to center the location. This should be
sufficient accuracy for any location storage and it also reduces
the file size a lot.
2018-07-14 11:14:51 -07:00
tastybento
2b024d035b Removed unused imports 2018-07-14 09:14:42 -07:00
tastybento
b431b9a092 Added lock and ban bypass via Op or perms.
https://github.com/tastybento/bskyblock/issues/201
2018-07-13 17:27:03 -07:00
tastybento
26200ae951 Fixed issues with self-inflicted damage.
https://github.com/tastybento/bskyblock/issues/203
2018-07-13 17:02:57 -07:00
tastybento
4003f839ed Added Island Go test.
https://github.com/tastybento/bskyblock/issues/205
2018-07-13 16:39:02 -07:00
Florian CUNY
ac4611e66f Minor code smells and code format fixes 2018-07-14 00:55:00 +02:00
Florian CUNY
bfe059f191 Fixes "Unknown command" when using uppercase characters in commands
Fixes #204.
2018-07-14 00:54:37 +02:00
Florian CUNY
5ec5a59dd4 Minor spacing/typo in AbstractDatabaseHandler 2018-07-13 17:29:57 +02:00
Florian CUNY
712e335814 Renamed ClickListeners and made most of them setup "by default" to avoid boilerplate code 2018-07-13 17:29:17 +02:00
Florian CUNY
59e58e8592 Fixed invalid Flag ID in ANIMAL_SPAWN's clicklistener 2018-07-13 13:38:50 +02:00
tastybento
451756bc81 Added clean super-flat world setting and test 2018-07-12 21:25:07 -07:00
tastybento
c64ecf76af Fixed admin command tab complete for Ops
Tab complete values are sorted now too.
2018-07-12 08:15:24 -07:00
tastybento
31455a033d Fixed code smells and bugs, added flower pot protection 2018-07-11 22:49:20 -07:00
tastybento
60a0c486f3 Added Banned Visitor Commands and test 2018-07-11 21:55:00 -07:00
tastybento
94bc2355ac Fixed test failures.
Fixed bug where spawn locs could be null.
2018-07-10 21:42:05 -07:00
tastybento
a663395a13 Players will teleport faster
Players will teleport to a spawn point if it is safe and marked.

https://github.com/tastybento/bskyblock/projects/3#card-11060603
2018-07-10 21:28:11 -07:00
tastybento
9021df099a Added permissions to settings.
Added test for Inv Visitors.

Default perms need to be added to plugin.yml or addon.yml for settings.
2018-07-08 16:45:17 -07:00
tastybento
13a246df59 Fixed bugs
Admin tp was not tp'ing to correct world
Dragon Eggs were unprotected.
Changed name of BSB getWorld methods to be more specific so they are not
used accidentally to get the general world.
2018-07-07 15:52:47 -07:00
tastybento
6781beb3ca Settings clean up. 2018-07-06 10:31:49 -07:00
tastybento
c1e6aa7350 Removed console spam around schem saving/loading 2018-07-06 10:22:40 -07:00
tastybento
4c4a72718e Fixed world_name placeholder for settings titles. 2018-07-06 10:14:07 -07:00
tastybento
4963ea573c Added offline redstone world flag
Removed constructor from LockAndBanListener. Due to loading order, some
manager objects are null. Flags load very early so must assume
everything is null.
2018-07-06 10:05:00 -07:00
tastybento
a60bcc8a22 Fixed settings. Implemented useowngenerator 2018-07-06 08:07:37 -07:00
tastybento
a72a49975f Added default island flags and settings to config.yml
These are specified per-world so go in the world section.
2018-07-05 21:10:47 -07:00
tastybento
2b5664c7ff New island checking improved to avoid infinite loop
If a world has the generator malfunctioning the server can crash if
there's no clear spot for an island. This limits the number of spots to
find an island to 10.
2018-07-05 17:25:21 -07:00
tastybento
66f3b5032d Added protection for plates and buttons from arrows
Added button text for flag.
2018-07-04 18:32:43 -07:00
tastybento
3657dda094 Ops and mod.bypassprotect perms can bypass protection.
Moved AbstractFlagListener and clicklisteners into API package
2018-07-04 14:55:34 -07:00
tastybento
aa1ef9bcbd Added new island and nether island schems
Fixed bugs with schem pasting, especially empty chests.
2018-07-03 17:51:01 -07:00
tastybento
265f05529b Schems save in the respective addon data folders 2018-07-03 11:05:14 -07:00
tastybento
4245ebaa33 Fix banner parsing issue 2018-07-03 09:41:09 -07:00
Florian CUNY
9f3e4e22dc Tells how much time it took to fully load BSkyBlock 2018-07-03 11:20:52 +02:00
Florian CUNY
0cb21d8468 Fixed NPE when the ItemParser returns null when the locale banner is an invalid String or does not exist 2018-07-03 11:19:48 +02:00
tastybento
693625ab9a Added placement based on bedrock. 2018-07-02 22:01:37 -07:00
tastybento
35247965fa WIP - still need to fix bedrock saving in schem 2018-07-02 20:35:21 -07:00
tastybento
c430d910b2 Added SchemsManager to handle global schems 2018-07-02 18:51:18 -07:00
tastybento
d725a3e1d8 Schems: sign placeholders for names and spawn location 2018-07-02 11:21:10 -07:00
tastybento
afa21d25ed Fixes schem issues.
https://github.com/tastybento/bskyblock/issues/192
2018-07-01 15:47:29 -07:00
tastybento
bc39e82dd2 Fixed stairs orientation. 2018-07-01 15:28:53 -07:00
tastybento
947853061e Added entities to schems. 2018-06-30 10:08:16 -07:00
tastybento
dd2a65bef4 Moved some settings. 2018-06-30 08:25:44 -07:00
tastybento
70c6b75992 Added island schems
These are pasted as the default islands. I think better ones can be
made!
2018-06-25 20:13:39 -07:00
tastybento
56d63dc9c8 Added resets for island joining. 2018-06-25 16:40:28 -07:00
tastybento
11d257c64a Added reset for inventory and enderchests.
Money is to do because it required Vault integration.
2018-06-25 15:17:16 -07:00
tastybento
638712566a Added leave and join settings for money, inventory 2018-06-25 14:35:31 -07:00
tastybento
9450bc8da1 Moved team leave confirm to api. 2018-06-25 14:34:52 -07:00
tastybento
ae1eeec7cf Fix for NPE on safe teleport when location cannot be found. 2018-06-24 18:23:57 -07:00
tastybento
eb855edfeb Adds white list for remove mobs to settings. 2018-06-24 17:57:31 -07:00
tastybento
8125ec52af Added default Game Mode to world settings.
https://github.com/tastybento/bskyblock/issues/179

Removed references to acid from settings for BSB.
2018-06-24 16:22:44 -07:00
tastybento
617fc712aa Code clean up 2018-06-23 19:25:39 -07:00
tastybento
dec162744c Code clean up 2018-06-23 19:20:02 -07:00
tastybento
e3731994b3 Removed duplicate code 2018-06-23 19:19:53 -07:00
tastybento
0e1ee335ea Code clean up. 2018-06-23 18:56:21 -07:00
tastybento
045855f6ad Removed code smells. 2018-06-23 18:38:48 -07:00
tastybento
bb4c199487 Removed code smells. 2018-06-23 18:20:27 -07:00
tastybento
4fc63b6de0 Changed move file to copy and delete in FlatFile. 2018-06-23 17:54:51 -07:00
tastybento
21c259f628 Made constructor private. 2018-06-23 17:06:47 -07:00
tastybento
729706f69d Reduced complexity of Flag constructor.
Added constructor to TextVariables.
2018-06-23 17:06:17 -07:00
tastybento
f12bc17ca3 Removed code duplication in Composite Command constructor 2018-06-23 16:32:53 -07:00
tastybento
9b8d42f692 Added island registration/unregistration.
Island center was not correctly being kept as immutable.
2018-06-23 15:45:09 -07:00
tastybento
97cf9b4132 WIP - testing register/unregister admim commands
JUnit tests do not pass, so bypass for now.
2018-06-21 22:30:09 -07:00
tastybento
12a1700848 Added Respawn On Island world flag.
Renamed getIslandWorldManaget to getIWM() in AbstractFlagListener.
2018-06-19 22:30:23 -07:00
tastybento
f32c661133 Added ItemParser test 2018-06-18 20:57:39 -07:00
tastybento
daf01ccd8d Switched to non-locale-based decimal place setting.
https://github.com/tastybento/bskyblock/issues/186
2018-06-18 08:12:21 -07:00
tastybento
d4951a5873 Added stack trace print for debugging
https://github.com/tastybento/bskyblock/issues/186
2018-06-18 07:45:50 -07:00
tastybento
108d099156 Added EnderChest protection.
Enderchests are an explout because they allow transfer of items between
worlds. These additions enable usage to be switched on/off at the world
level. Also prevents ender chest crafting. These protections can be
bypassed via a permission or via Op.

Also, I fixed some settings issues in general around default settings.
2018-06-17 21:37:50 -07:00
tastybento
fba05ecc81 Fixed bug where database saving was every 5 ticks.
Changed to calculate minutes for database backup time.
2018-06-17 18:18:35 -07:00
tastybento
8353d266a5 Saved YML files then move for reliability reasons
Instead of saving on top of a YML file, we now save to a tmp file and if
it is saved successfully, then it is moved on top of the old file in an
atomic move. This helps avoid data loss if the file write fails.
2018-06-17 17:15:44 -07:00
Florian CUNY
a71eee537d Print a kind message in console when the plugin is fully loaded 😄 2018-06-17 14:49:19 +02:00
Florian CUNY
45b4f32d78 Print more detailed info about addons loading in console 2018-06-17 14:48:53 +02:00
Florian CUNY
a8f2cabd82 Added support for banners in ItemParser & updated banners in locales 2018-06-17 14:39:40 +02:00
Florian CUNY
2249bc4864 Took ItemParser from the addon challenges 2018-06-17 11:48:35 +02:00
Florian CUNY
24a88e09ac Added ENDER_CHEST flag and splited LEVER_BUTTON into LEVER and BUTTON 2018-06-17 11:36:17 +02:00
Florian CUNY
b45a3160c7 Should fix #158 2018-06-17 11:35:46 +02:00
tastybento
45c0bc84da Removed debug lines. 2018-06-16 19:34:58 -07:00
tastybento
c8dfd4a242 Removed admin world command because world settings are back in general
settings command as a panel.
2018-06-16 19:28:53 -07:00
tastybento
034015ee4d Switched back to using hard-coded islands while debugging.
Removed unused imports.
2018-06-16 19:06:08 -07:00
Florian CUNY
8ee42d3c47 Changed the description of the "Island protected" message to an "hint"
related to #184
2018-06-16 17:15:51 +02:00
Florian CUNY
b410d49c2b Made the SettingsPanel fancier (well, I tried xD)
Had to remove the "MENU" FlagType, which I replaced by the "subPanel" argument in the Flag itself.
2018-06-16 17:10:00 +02:00
Florian CUNY
4525a04324 Splited MUSIC flag into JUKEBOX and NOTE_BLOCK
It has been suggested in #182.
2018-06-16 16:46:01 +02:00
Florian CUNY
d4264a1c26 Fixed the click sound being also played to players nearby 2018-06-16 15:15:15 +02:00
Florian CUNY
c68c8d26cb Language Panel: sorts the languages differently 2018-06-16 15:03:52 +02:00
tastybento
e5cfab50f7 Fix PanelListenerManager tests.
Added JavaDoc and adjusted boolean method name.
2018-06-16 10:52:44 +09:00
tastybento
21601089f4 Merge remote-tracking branch 'origin/develop' into develop 2018-06-16 10:44:13 +09:00
tastybento
ce65d34cb4 WIP - switching to using simple schems instead of hardcoded islands 2018-06-16 10:44:04 +09:00
Florian CUNY
d2697e1525 Added a description variable to the "Island protected" message
Added "[description]" in TextVariables
added getName- and getDescriptionReference() in Flag
2018-06-11 15:55:01 +02:00
Florian CUNY
63dd2d95b2 Added option to close panel on click outside of it
This is related to commit #8d596c5f1d24ea2e319e5172b2c954a8caa46f67
2018-06-11 12:19:14 +02:00
tastybento
aa7fbabf82 Fixed bugs with NPEs in non-island worlds. 2018-06-10 22:34:01 -07:00
tastybento
10d5c262ca Added test class for PanelListenerManager
Refactored some code to be more streamlined.
2018-06-10 21:10:02 -07:00
tastybento
8d596c5f1d Closes panels when clicked outside.
https://github.com/tastybento/bskyblock/issues/180
2018-06-10 20:10:41 -07:00
tastybento
92a7b0e596 Added admin "world" command.
This is used to set world settings.
2018-06-10 17:23:48 -07:00
tastybento
d364c006b0 Improvide code readability. 2018-06-10 15:42:21 -07:00
tastybento
1240cd266e Implemented remove mobs on teleport
I simplified this to just remove mobs on login and island teleport. The
mobs to keep are currently hard coded. They could be taken from settings
in the future.
2018-06-09 23:06:59 -07:00
tastybento
90563dac35 World Flags are saved in the config.yml file.
Previously, world settings (world setting flags) were not actually being
saved anywhere. They are now saved in the config.yml.

WIP: RemoveMobsListener.java

Improved the FlagTest.
2018-06-09 22:09:20 -07:00
tastybento
1fc1780fd1 Fixed flag text and descriptions. 2018-06-09 17:22:38 -07:00
tastybento
27639f673a JavaDoc clean up. 2018-06-09 16:40:38 -07:00
tastybento
db3344c8b9 Completed Invincible Visitors and PVP listeners.
This was a lot more work than I expected, but in the end the test class
was the best approach to cover all the edge cases.
2018-06-09 15:54:09 -07:00
tastybento
9a666e29ca Added specific WORLD_SETTING flag.
This flag is separate from island SETTING flags. The settings are done
in a different way and rather than try and work out which type is which,
it is better to specify them at the start.

Also added a SUB_MENU settings type.
2018-06-08 08:20:16 -07:00
tastybento
8a339f755a Added Invincible Visitor settings.
This led to work to enable saving of the config.yml file with comments.
I added the ability to have multiple lines of comments as annotations.
I also enabled comments to align with the exact path of the field.
To do this I used BSBConfig for the Settings class and retired ISettings
When the plugin disables, it now saves the config.yml with comments and
the Invincible Visitor settings.

Note that any settings in the config.yml stored in the jar will still
exist in the file and stay there unless they are manually deleted. They
just will not have any comments on them after saving.
2018-06-05 00:06:55 -07:00
tastybento
aed648e6e7 Added Piston Push setting.
Allows/Disallows piston pushing outside an island.
This is a worldwide setting for admins.

https://github.com/tastybento/bskyblock/projects/3#card-10260101
2018-06-04 19:24:11 -07:00
tastybento
5904ef9194 Added Enter/Exit messages
This required adding support for world-specific toggle settings.

This also affected some other listeners.
2018-06-03 20:54:37 -07:00
tastybento
beafb5dd4c Fixes frost walker console spam.
https://github.com/tastybento/bskyblock/issues/181
2018-06-03 15:48:52 -07:00
tastybento
f3472815c9 Fixed schems
The admin command "schem" now works very like WorldEdit.
You set the pos1 and pos2, copy to clipboard and paste
You can save and load. Schems go into the schems folder.
2018-06-03 15:33:45 -07:00
tastybento
1289060bd4 Merge branch 'confirmation' into develop
Conflicts:
	locales/en-US.yml
	src/main/java/us/tastybento/bskyblock/commands/island/IslandResetCommand.java
2018-06-03 14:03:46 -07:00
tastybento
2ea268f90f Added confirmation code to CompositeCommand
How does this look?
2018-06-03 13:36:48 -07:00
Florian CUNY
433efcf6c0 Might a fix a NPE when loading Players from Flatfile database 2018-06-03 16:04:45 +02:00
Florian CUNY
4897d8ef77 Fixed some code smells 2018-06-03 10:23:45 +02:00
Florian CUNY
3d7ef58323 Removed unused argument in InventorySave constructor 2018-06-03 10:09:31 +02:00
Florian CUNY
3ab2c46eed Reduced notification delay to 4 seconds 2018-06-03 10:08:50 +02:00
Florian CUNY
f5b5426327 Created TextVariables class that contains common text placeholders 2018-06-03 10:07:58 +02:00
tastybento
b87b00d887 Cleaned up some code smells. 2018-06-02 19:54:41 -07:00
tastybento
e69971d73c Cleaned up some config settings. 2018-06-02 19:21:59 -07:00
Florian CUNY
caa2501968 Removed the help item from the SettingsPanel 2018-06-02 22:01:05 +02:00
Florian CUNY
08e11e90fa Made CycleClick handle right click 2018-06-02 21:42:14 +02:00
Florian CUNY
d7b2c70b78 Fixed unaccurate logic in PanelBuilder#nextSlot() 2018-06-02 21:41:27 +02:00
tastybento
e7649f19d4 Added cycling click to protection flags. 2018-06-02 11:27:51 -07:00
tastybento
320c9a9f43 Fixes help permissions. 2018-06-02 08:39:45 -07:00
tastybento
d94477034a Performed code cleanup using Intellij. 2018-05-31 18:52:05 -07:00
tastybento
bcc0028671 Removed debug 2018-05-30 20:27:41 -07:00
tastybento
53bd51e2f5 Fixed issue with adapter serializer
Serialize and deserialize were opposite

In deserializing in flatfile db, there was an odd extra bit of code that
undid the deserialization. I'm not sure why I put that in there and so
I've commented it out for now.
2018-05-30 20:23:05 -07:00
tastybento
6b6ec4c697 Fixed bug where worlds were not existing when islands loaded.
If islands are loaded before the world exists the island's world becomes
null. If an addon is creating an island then it must be loaded before
islands.

Also refactored some of the addon loading code.
2018-05-29 16:59:52 -07:00
tastybento
3b7b7fa557 Fixed bug with saving to flat file.
Must remember to include blank constructor so Beans can create the
object!
2018-05-29 14:57:01 -07:00
tastybento
d34ad5dce3 Fix bug with sethome not replacing previous homes. 2018-05-28 20:23:15 -07:00
tastybento
8f469eb339 Updated to work with addons like warps. 2018-05-28 15:46:07 -07:00
tastybento
b402450253 Cleaned up some vulnerabilities and code smells. 2018-05-27 21:37:00 -07:00
tastybento
3404fac8f2 Arrays can stream directly. 2018-05-27 08:50:14 -07:00
tastybento
60eac8e54e Fixed bugs
Fixed issues where Settings were used instead of WorldSettings.
Added getWorld to the Admin team commands.
2018-05-27 00:05:36 -07:00
tastybento
66d9ef857d Removed constants that reference the island and admin commands.
Fixed bug where addon onLoad was being called twice.
2018-05-26 18:20:02 -07:00
tastybento
a5a75c6854 Fixed tests. 2018-05-26 15:50:10 -07:00
tastybento
4bf0d8ec0f Fixed bug with island command and island go 2018-05-26 15:35:02 -07:00
tastybento
007a9af025 Redid API for multiworld.
Now AcidIsland uses its own command instead of island.

Added a world element to commands so they can operate only in specific
worlds.
2018-05-26 13:08:35 -07:00
tastybento
6d17d48bde Removed AbstractIslandTeamCommand
This was using static data structure that would not work well when other
addons use the command.
2018-05-26 11:43:22 -07:00
tastybento
35b715ff80 Fixed tests. 2018-05-25 17:58:07 -07:00
tastybento
74c86901d0 Fixed issue with player name not being set correctly. 2018-05-25 17:15:56 -07:00
tastybento
682d34849a Small change to clarify /island use outside of island worlds 2018-05-25 15:11:17 -07:00
tastybento
6a18cc4ccc More multi-world work.
This handles multiworld operation. Test with AcidIsland addon.
2018-05-25 12:19:46 -07:00
tastybento
82ee6d746e Added an Island World Manager that handles worlds
Still a WIP but it's gradually coming along.
2018-05-20 16:09:57 -07:00
tastybento
576d9ff314 Merge remote-tracking branch 'origin/develop' into multigame 2018-05-20 14:18:38 -07:00
Florian CUNY
736ba10c53 Fixes https://github.com/tastybento/bskyblock/issues/166 2018-05-20 22:00:22 +02:00
tastybento
df696fb4a0 Reworked world checking.
Worlds are checked by the IslandWord class. Additional worlds can be
added to the list of worlds covered by BSB by Addons.
2018-05-18 23:08:18 -07:00
tastybento
9f6819bd3b WIP: Converted to a mutli-world/mutli-game type model
This branch adds a world aspect to almost all commands. Although the
Bukkit World class is used for reference, the world includes any nether
or end worlds too. By enabling multiworld, things like the protection
grid will operate independently in different world groups. The idea is
to enable one plugin to run mutliple worlds. For example run AcidIsland,
ASkyGrid and BSkyBlock at the same time.

In addition to this big change, I added an admin command to copy and
paste "simple" schematics that I called "schems". It does not work
completely correctly right now, especially for chest contents.
2018-05-17 21:25:12 -07:00