* Add 1.9+ PvP 'Cooldown'
This commit adds a subtitle that acts as the Java cooldown. This is an optional feature disabled in the config with `show-cooldown`. This does not appear on plugins that use OldCombatMechanics.
* No need to bump up the config version; I was just tested with OldCombatMechanics
* Use simpler casting
* Use session variable of lastHitTime for theoretically better performance
* Reuse attribute value calculation from AttributeUtils
* Remove unused imports
* Revert config version update in config.yml
* Entity (mostly rotation) fixes
This PR adds:
- Pig health displaying. Doesn't fix pigs being able to be controlled
- Entity rotation is *mostly* correct. Villagers and sitting cats still seem to be odd but the ender dragon works great.
* Remove debug line
* Abstract rotation updating to functions per-entity
* Don't include changes from other projects
* Minor improvements
* Make updateRotation and updatePositionAndRotation cleaner
* Javadoc
* Fix maps not loading in sometimes
Adds a default map ID so the map item isnt invisible on bedrock.
Respond to the MapInfoRequestPacket so the image loads on first join.
* Remove debug log
* Add comments
* Fix block entities on older versions
This commit solves two problems related to block entities on older versions:
- Occasionally, tags would contain the ID under a StringTag with an empty value, and not the ID tag.
- The block entity regex did not account for block entity tags that were already in a Bedrock-compatible format (BlockEntity)
* Move BLOCK_ENTITY_TRANSLATIONS to BlockEntityTranslator
* Configuration updates
The main feature of this commit is switching Bukkit and BungeeCord to using Jackson configuration. This allows comments to load. Along with this, the Jackson configs have been consolidated into one abstract class, and a check is made to ensure auth-type cannot be set to Floodgate if Floodgate is not installed.
* Add deleted file; remove imports
* Re-add changing of Bukkit port
* Alphabetize import
* Alphabetize Bungee import
* Updates
* Swap values in GeyserJacksonConfiguration
* Add a null check for GeyserConnector in Bukkit's onDisable
This adds the height of the armour stand to the position if its invisible and not a marker to counteract the scale being 0 therefore having a wrong nametag position
* Fix edge case when shift clicking an output slot
* Don't send window close packet if window is already closed
* Limit amount of window close packets sent to the client
Fixes hidden inventory bar bug
* Restrict user from unusable chest inventory slots
* Fix crafting table slot mappings
* Always send cursor update
This handles DISPLAY_ITEM and related properties separately on furnace minecarts in order to prevent overwriting furnace minecart graphics.
Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
* Ignore all downstream packet errors
Instead of kicking the client off because of an error, we simply display a logger warning and suppress the error.
* If debug mode, print stacktrace
* Implement translator for AdventureSettingsPacket
The AdventureSettingsPacket is translated into ClientSettingsPacket so the MAY_FLY and FLYING flags are sent to the server. This fixes double-jumping on some servers that rely on the client sending their flying information through this packet.
* Remove top-secret code analysis
Firework NBT data might be either an int or byte and bedrock only takes it as a byte.
Co-authored-by: Arktisfox <65837019+Arktisfox@users.noreply.github.com>
Bedrock knows its own UUID and when it receives the Java uuid it will either crash (MCEE) or add a ghost player onto the playerlist (Bedrock).
This change will check if an entity is the client and if so replace the entities UUID with the AuthData UUID.
A refactor of JavaPlayerListEntryTranslator was also done as I got confused each time what it was doing so it is now hopefully a bit clearer and also fixes the case where an entity is removed but still exists on the server (Vanished).
Book pages can be sent as plain text rather than JSON. The text library doesn't use lenient parsing, so this fails, and the book isn't visible in the inventory.
This will convert the text into JSON if it's not already, before feeding it to the text library.
- Merged ItemTranslator and ItemStackTranslator together.
- Split ItemTranslator into two classes: ItemTranslator and ItemRegistry. The registry is where items are registered, and the translator class is where item translation takes place.
- Made most of ItemTranslator's methods static and removed the initialization in Toolbox.
- Moved a handful of registry classes previously ending with 'Utils' to a 'Registry' class to be more fitting for the term.
- Moved inventory and block entity registration out of Translators.
- Renamed Translators to PacketTranslatorRegistry.
- Yeeted Toolbox.
- Minor cleanups and small refactors.
* Check if firework item explosions tag is null (corresponding entity fix)
* Add null check on flight
* Add null check around Flight
* Fix newline on if statement
* Fix newline on if statement, add null check on flight, remove debug code.
* fix missing space..
Causes interacting (moving) an item in an item frame to delay by about half a second. This delay is still present on chunk load where this delay is absolutely needed in order to the item frame to show up.
* Fix ping passthrough on BungeeCord
* Initial implementation of direct ping passthrough
* Finished implementation of direct ping passthrough
* Remove test for something else entirely
* Fix standalone
* Add config option for ping passthrough interval
* Use GeyserPingInfo to reduce methods
* Add querying; modify ping passthrough
* Add separate config options for passthrough MOTD and player counts
* Convert all plugin bootstraps to use internal ping events to that other plugins can handle ping modifications
* Small changes
* Fix invalid packet spawm
* Add legacy ping passthrough option
* Fix BungeeCord
* Proper UUID for BungeeCord, thanks @theminecoder
* Update config version and messages
* Merge master... again
* Add missing javadocs and minor changes
Co-authored-by: James Harrison <james@fasttortoise.co.uk>
Co-authored-by: theminecoder <theminecoder.dev@gmail.com>
Co-authored-by: Redned <redned235@gmail.com>