Commit Graph

481 Commits

Author SHA1 Message Date
56bf51f370 Adds missing JavaDoc 2021-10-29 18:43:22 +02: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
0237f45046 Renames activatedTime to triggeredTime and makes some public fields private
Makes the active portals queue and open portals queue and languageLoader fields private
Cleans the StargateThread a bit
Renames activatedTime to triggeredTime as the dual use (open and activate) made the name confusing
2021-10-29 17:22:58 +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
f52ba79ae9 Splits the preventExitSuffocation method and improves some more comments 2021-10-29 15:08:44 +02:00
945798916b Removes an unnecessary portal close statement after teleporting a player through BungeeCord 2021-10-29 15:07:45 +02:00
f0e5cd45a4 Adds some minor style improvements 2021-10-29 01:46:15 +02:00
487cb3ad9e Adds missing info about Bungee-related permissions to the readme and adjusts permissions a bit
Adds stargate.server and stargate.admin.bungee permissions to the readme
Renames stargate.reload to stargate.admin.reload for better consistency
Makes the stargate.admin permission only give the reload, hidden, private and bungee permissions while the wildcard permission gives all permissions
2021-10-29 01:45:50 +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
eaf7596014 Adds information about the new default gates to the Building a gate section 2021-10-26 12:51: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
3367d4bb76 Disables the generation of buttons on bungee portals 2021-10-23 22:17:02 +02:00
a100ad3fea Fixes a check which broke all bungee portals 2021-10-23 22:16:36 +02:00
2541391d3e Moves all config related code from Stargate to StargateConfig 2021-10-23 18:34:31 +02:00
b7998023f5 Moves activeTime and openTime into the StargateGateConfig 2021-10-23 14:35:07 +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
4e09b44c7c Extracts portal registration and all portal lookup to the PortalRegistry class 2021-10-21 23:59:16 +02:00
593d528bcd Extracts the portal creation and validation part of the PortalHandler into the PortalCreator 2021-10-21 20:15:29 +02:00
79a43b82e5 Fixes the readme's max sign character limits as the real limit is 11, not 12 2021-10-21 20:13:34 +02:00
cb2f7443f5 Improves comments for PortalOptions 2021-10-21 16:39:35 +02:00
8eff9ae5e6 Fixes comments for the PortalOpener class 2021-10-21 00:27:42 +02:00
4b42d4914a Renames openTime to activatedTime, though it's kind of used for both opening and activation 2021-10-20 20:57:00 +02:00
2650e31d97 Fixes comments for the portal activator 2021-10-20 20:55:51 +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
f4ec5e05d6 Improves sign drawing during portal loading
Adds "Invalid gate" to the last line of portals with an invalid or unloaded gate type
Re-draws all portals' signs on load in case some invalid portals becomes valid. This also updates any formatting
2021-10-18 18:34:35 +02:00
8c16ddbed5 Adds some tests to the relative block vector 2021-10-18 15:22:55 +02:00
27b1f0641e Adds some block location tests 2021-10-18 14:57:12 +02:00
ac045fa7db Fixes a severe bug caused by trying to simplify GateLayout's saveLayout method 2021-10-18 04:00:18 +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
d9ae5456cc Improves permission checking for vehicles with multiple passengers
Changes some log messages into debug messages
Makes sure that all player passengers of a vehicle have their permissions verified and fee paid. This ensures passengers won't get a free ride, or be allowed to access restricted areas by playing stowaway.
2021-10-18 03:35:59 +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
3de785d5ab Improves and fixes comments for the gate layout class 2021-10-16 16:44:11 +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
5299efaa86 Renames types to characterMaterialMap inside the GateHandler class 2021-10-15 19:46:25 +02:00
e2c91c1feb Changes EconomyHandler method names to be more consistent 2021-10-15 19:25:31 +02:00