Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 1.24.0 #2152

Merged
merged 47 commits into from
Jul 3, 2023
Merged

Version 1.24.0 #2152

merged 47 commits into from
Jul 3, 2023

Conversation

tastybento
Copy link
Member

Features and bug fixes and support for the latest Minecraft server version.

tastybento and others added 30 commits May 28, 2023 12:11
Add new IslandNameEvent and test class for command
May break compatibility with older server versions.
Made some admin commands have their own perm so that they can be
controlled  individually by permissions.
This makes it easier for listeners to determine if they should react or
not.
Add API to enable gamemodes to register ownership over additional worlds
Fixes the logic and adds a bunch of tests to prove the logic works.
Update GitHub actions to NodeJS 16
Remove 1.20 from server compatibility as a result.
If sign is waxed (not editable) then no check is required
@tastybento tastybento requested a review from BONNe June 30, 2023 00:29

static
{
stringFlags = Map.of(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for this any more as Tag is used.

/**
* Handle interaction with blocks
*
* @param e - event
*/
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed priority to enable sign shops to be used. Previously it had no affect because we never checked signs, but now that we do, the priority needs to be higher. ChestShop uses LOW.

@@ -65,13 +45,13 @@ public void onPlayerInteract(final PlayerInteractEvent e)
}

// Check clicked block
this.checkClickedBlock(e, e.getPlayer(), e.getClickedBlock().getLocation(), e.getClickedBlock().getType());
this.checkClickedBlock(e, e.getPlayer(), e.getClickedBlock());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need the block now, not just the type and location.

// this.checkIsland(e, player, loc, Flags.CHEST);
// }

if (Tag.ITEMS_CHEST_BOATS.isTagged(type))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now use the tag. It's been available for a long time.

@@ -124,7 +125,7 @@ public void onPlayerInteract(final PlayerInteractEvent e)
{
this.checkIsland(e, e.getPlayer(), e.getPlayer().getLocation(), Flags.PLACE_BLOCKS);
}
else if (e.getMaterial().name().contains("BOAT"))
else if (Tag.ITEMS_BOATS.isTagged(e.getMaterial()))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the tag instead of string check.

|| Tag.ITEMS_CHEST_BOATS.isTagged(ground)
|| Tag.CAMPFIRES.isTagged(ground)
|| Tag.FIRE.isTagged(ground)
|| Tag.FIRE.isTagged(space1)
|| space1.equals(Material.END_PORTAL)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use Tags galore!

player.updateInventory();
}
}
readyPlayer(player);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove code duplication

for (String line : fromSign.getLines()) {
toSign.setLine(i++, line);
for (Side side : Side.values()) {
writeSign(fromSign, toSign, side);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double sided signs.

@@ -98,6 +101,15 @@ public void showAdminInfo(User user) {
if (island.getPurgeProtected()) {
user.sendMessage("commands.admin.info.purge-protected");
}
// Fire info event to allow other addons to add to info
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New Event

/**
* @since 1.24.0
*/
V1_20(Compatibility.INCOMPATIBLE),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.20 is not compatible because the waxed sign API is not in it, only in 1.20.1.

@tastybento tastybento marked this pull request as draft June 30, 2023 00:49
@tastybento
Copy link
Member Author

I think #2136 still needs to be done or looked at.

@tastybento tastybento marked this pull request as ready for review July 1, 2023 17:04
@tastybento
Copy link
Member Author

I think this is ready now.

tastybento and others added 4 commits July 1, 2023 12:49
The goal is to make BentoBox less of a monster class and have fewer
dependent classes.
Put island deletion under one class manager
@tastybento tastybento merged commit 363b23a into master Jul 3, 2023
@sonarcloud
Copy link

sonarcloud bot commented Jul 3, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

52.7% 52.7% Coverage
1.0% 1.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants