66 Commits

Author SHA1 Message Date
70495220eb Simplifies some function calls
Some checks failed
EpicKnarvik97/Stargate/pipeline/head There was a failure building this commit
2021-11-15 17:18:00 +01:00
29c1a00fcd Makes the max portal name and network character limit more easily changeable 2021-11-13 19:28:17 +01:00
2c53b7d2a6 Makes portal names and networks case and color-insensitive and increases length limit to 13. #17
Ignores &[0-9a-f] color codes when counting towards the name and network string limits
Makes portal lists store cleaned portal and network names to ignore case and color
Names and networks will now match regardless of case and color
Increases portal name/network limit to 13 characters
2021-11-12 15:33:15 +01:00
42e02eb141 Makes the UUIDMigrationHelper final 2021-11-12 13:46:01 +01:00
2a17714e8d Makes sure to only remove buttons from always-on portals if the block is a type of button 2021-11-08 15:16:51 +01:00
4db6274dc3 Fixes underwater signs and buttons being replaced with AIR instead of water 2021-11-08 01:34:18 +01:00
fc744b04dc Adds an option for a stargate without a sign #10 2021-11-07 13:41:19 +01:00
527562bc60 Fixes code formatting 2021-11-07 04:29:25 +01:00
5f2d7988e2 Fixes button updating
Fixes a bug causing signs to be removed
Makes the old button properly disappear
Saves the portal database(s) to store the new button location if necessary
2021-11-06 18:08:01 +01:00
aa3bb58b33 Fixes some bugs regarding sign drawing and button updating
Fixes a bug displaying a portal as usable even if it's been unregistered
Fixes a bug which causes the portal button to be re-generated, even if the portal has been unregistered
2021-11-06 15:33:06 +01:00
ee0e66e9be Fixes the order in which the portal's button is updated to fix one of the bugs in #15
Some checks failed
EpicKnarvik97/Stargate/pipeline/head There was a failure building this commit
2021-11-06 14:49:56 +01:00
8c4cf16375 Adds an option for silent stargates which don't print teleportation messages or errors to the player's chat #7 2021-11-05 23:39:18 +01:00
0297d62d6d Sets the always on option to true for bungee portals and removes some unnecessary checks 2021-11-05 21:40:06 +01:00
80ff241d4b Makes stargates' buttons update when portals are loaded #14 2021-11-05 21:38:33 +01:00
f3292cff99 Makes containers used as buttons no longer open when right-clicked 2021-11-05 19:21:27 +01:00
e0ac9b41e7 Adds some sub-packages to the portal package to improve logical structure
Some checks failed
EpicKnarvik97/Stargate/pipeline/head There was a failure building this commit
2021-11-04 00:07:03 +01:00
2a61480684 Adds UUID fetching on player join. See #12
Whenever a player joins, their names will be checked against a map containing all names which need to be migrated to UUID. All portals the player has created which still use the player name will be updated.
2021-11-01 15:13:22 +01:00
56ed0495b0 Removes the last of the unprotected variables from Stargate
Makes all classes use getInstance() to get a Stargate instance
Removes the server variable as it's not needed
2021-10-29 18:35:20 +02:00
5d84e1d78a Changes some sign coloring and adds some missing info to the readme
Makes the Disconnected message red
Makes the highlighting characters (><) white when cycling stargate destinations
Moves markPortalWithInvalidGate to PortalSignDrawer
Adds missing translation strings for reloaded and signInvalidGate to the readme
Moves some extra spacing around the >< characters
2021-10-29 16:05:23 +02:00
f0e5cd45a4 Adds some minor style improvements 2021-10-29 01:46:15 +02:00
544384f69b Cleans up permissions a lot and adds missing permissions to plugin.yml
Removes the checking of both parent and child by adding the child permissions to plugin.yml
Cleans comments in the PermissionHelper class
Renames hasPermDeep to hasPermissionImplicit as I finally understand how it's supposed to work
Adds missing unmock() to prevent test errors
Adds a ton of permissions which were mentioned in the code, but did not exist in the plugin.yml
2021-10-28 18:29:33 +02:00
3fc0e6963a Adds tests for the material helper and adds all chest variations as button compatible 2021-10-27 20:56:56 +02:00
5c730eb613 Fixes some portal closing bugs, a NullPointerException and a typo
Fixes a typo in nn-no
Fixes a bug causing always-on portals not to be closed properly
Fixes a possible NullPointerException in onEntityPortalEnter
Waits for block change request on reload which makes it possible to change the open-material with just a reload
2021-10-26 16:22:20 +02:00
1c906528f2 Cleans up message logging quite a bit
Adds methods to Stargate for easier logging and less redundancy
Loads the language loader in two parts to make it available while loading
Adds a translated string to the reload-message
Uses String.format to make long messages more readable
Makes it possible to get strings directly from the backup language to make debugging easier
2021-10-26 15:05:05 +02:00
669767ef89 Renames RelativeBlockVector's right, depth and distance to right, down and out respectively 2021-10-24 22:48:13 +02:00
822f8fb2b5 Changes BungeeCord messages to use UUID instead of player name 2021-10-24 21:15:43 +02:00
2541391d3e Moves all config related code from Stargate to StargateConfig 2021-10-23 18:34:31 +02:00
deba2e5c2c Makes the stargate logger private 2021-10-23 14:25:46 +02:00
7cc8685e26 Moves all methods for sending messages to players to the MessageSender class 2021-10-23 14:10:33 +02:00
50084c40f9 Moves the Bungee Queue to BungeeHelper 2021-10-23 12:58:31 +02:00
2196d5b99e Moves some config values from StarGate and into the StarGateConfig class
Renames EconomyHandler to EconomyConfig and puts it in the new config package
Moves the LanguageLoader to the config package
Fixes the explanation of chargeFreeDestination in the README
2021-10-23 03:56:59 +02:00
070e7250df Re-draws every portal sign each time a new world is loaded to prevent weird states 2021-10-22 21:56:35 +02:00
9a0f16e558 Moves the portal owner name and owner UUID to the PortalOwner class which makes the TwoTuple unnecessary 2021-10-22 19:51:46 +02:00
485ca284b0 Extracts portal saving and loading to the PortalFileHelper class 2021-10-22 16:18:35 +02:00
d2e8c81a5a Splits the portal class into Portal, PortalActivator, PortalOpener and PortalStructure
PortalStructure now contains information about the gate's physical structure, such as the location of border blocks, the location of entrances, the gate type and the button location.
PortalActivator is responsible for activating/de-activating portals, destination toggling and getting information about available destinations.
PortalOpener is responsible for opening/closing a portal. It's also the place to go for checking if the portal is open for a given player.
Comments of the Portal class have been improved, but the comments of the three new classes need fixing.
2021-10-20 16:09:35 +02:00
635d08b1b3 Makes the SignHelper helper class into the proper PortalSignDrawer which each Portal now has one instance of 2021-10-20 01:33:36 +02:00
1d4b988ca4 Moves the rest of the sign drawing code from Portal to SignHelper 2021-10-18 19:12:30 +02:00
82ed28bba0 Removes the DirectionHelper's getBlockAt method as it only increased complexity 2021-10-18 18:52:24 +02:00
0506cf1b61 Splits the PortalTeleporter into a PlayerTeleporter and a VehicleTeleporter for better structuring
Moves player-related teleportation code to PlayerTeleporter, moves vehicle-related teleportation code to VehicleTeleporter and makes them both extend the Teleporter which now contains all common teleportation code.
2021-10-18 18:38:36 +02:00
982d8abf65 Extracts teleportation code into the PortalTeleporter class to improve readability 2021-10-18 03:41:16 +02:00
f96e8ed2da Adds a method for checking if a player can afford a given fee 2021-10-18 03:36:56 +02:00
fabe0dda80 Fixes inconsistencies in coloring of the portal name when drawing signs. The - is now white. 2021-10-17 22:47:27 +02:00
59069d1423 Improves comments in the GateHandler class and extracts some code into GateReader
Moves code for reading .gate files into the GateReader helper class
Improves all comments in GateHandler where possible
Adds more helper comments
2021-10-15 22:16:02 +02:00
e2c91c1feb Changes EconomyHandler method names to be more consistent 2021-10-15 19:25:31 +02:00
e14007380f Adds proper checking and odd case catching before teleporting players through artificial end portals
Adds a proper permission check to make sure players are allowed to teleport through the artificial portal
Adds a teleportation back to the entrance as the teleportation event cannot be properly cancelled
Adds a proper class for storing info about the teleportation
2021-10-12 02:47:09 +02:00
69a62c921c Fixes the color inconsistency for the portal selection "arrows" for gates with colored names 2021-10-10 17:21:19 +02:00
fff4d8d78b Gets rid of the rest of the modX and modY usages, and removes some unused code 2021-10-08 18:23:42 +02:00
6d5c4802bc Creates some new methods to get a location from a relative location which I can actually understand 2021-10-08 15:28:12 +02:00
e7fc1daafe Moves functionality to the PortalOptions and PortalLocation classes 2021-10-08 01:26:12 +02:00
650a26402a Moves all config migration mappings to its own file 2021-09-23 17:50:43 +02:00