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

Release 1.19.0 #1890

Merged
merged 154 commits into from
Dec 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
1ee83cd
Version 1.17.1
tastybento Jun 27, 2021
19ddd73
Add homes command to default player options.
tastybento Jul 6, 2021
3a1ec0a
Implements better online player counter. (#1791)
BONNe Jul 6, 2021
4139c5f
Add Boxed Gamemode to the list. (#1793)
BONNe Jul 6, 2021
89625a7
Add Bank addon (#1792)
BONNe Jul 6, 2021
7de6563
Add Holographic Displays as SoftDepend for AOneBlock (#1794)
Fredthedoggy Jul 6, 2021
f88b8d4
Custom date time format support for /<admin> info <player> (#1783)
jstnf Jul 6, 2021
0f7866a
Parent/sub-flag support, split up and designate CONTAINER flag as par…
jstnf Jul 6, 2021
759ba52
Add world setting flag for island visitors keep inventory (#1785)
jstnf Jul 6, 2021
69f7b49
Implement 3 bar charts: addons, gamemodes, hooks (#1790)
BONNe Jul 6, 2021
dfca46a
Update action versions
tastybento Jul 6, 2021
ed0084f
Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.g…
tastybento Jul 6, 2021
70a2c20
Declare distribution - adopt
tastybento Jul 6, 2021
4da61f6
Cache Java Maven files differently.
tastybento Jul 6, 2021
3450bae
Try dependency for shade snapshot
tastybento Jul 6, 2021
0845722
Add support for Minecraft 1.17.1
tastybento Jul 6, 2021
9e3a572
Fix test by incrementing listener value check
tastybento Jul 6, 2021
ce4b124
Spigot 1.17.1
tastybento Jul 6, 2021
3d1481f
Fix test for InventoryListener
tastybento Jul 6, 2021
e1c0810
Re-order repos.
tastybento Jul 7, 2021
03f6b95
Downgrading to 1.17 Spigot for now to enable building.
tastybento Jul 7, 2021
9cdebe8
Try pluginRespositories tag in POM to enable Github actions
tastybento Jul 9, 2021
09d6a9f
Version 1.17.2
tastybento Jul 14, 2021
2044c73
Add alternative Addon#getIslandManager method (#1797)
BONNe Jul 24, 2021
21fed6e
Fix bucket dupe (#1806)
gecko10000 Jul 24, 2021
9b1d616
Removes unneeded exploit protection code for skulls (#1810)
tastybento Jul 24, 2021
3b136f0
Quote filename of addon that cannot be loaded.
tastybento Jul 25, 2021
6bac200
Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.g…
tastybento Jul 25, 2021
b5725e7
Remove update when pasting chest.
tastybento Jul 25, 2021
5d7c199
Merge branch 'master' into develop
tastybento Jul 25, 2021
f89050f
Version 1.17.3
tastybento Jul 25, 2021
acfc001
Java upgrade (#1814)
tastybento Jul 31, 2021
1bd11bb
Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.g…
tastybento Jul 31, 2021
27e9c9c
Update JavaDoc version to 16
tastybento Jul 31, 2021
cf8df9c
Make spawn protection area square instead of circle.
tastybento Aug 8, 2021
56a1fdb
Improve ItemParser code. (#1821)
BONNe Aug 8, 2021
cc974c7
Added deprecation suppression.
tastybento Aug 9, 2021
7cadebc
Added Pladdon to loadbefore.
tastybento Aug 13, 2021
6b839d9
Prevent bucket duping when scooping obsidian Part 35
tastybento Aug 14, 2021
233c058
Warns visitors that PVP is active if they teleport to an island
tastybento Aug 15, 2021
32638e7
Prevents repeated portaling when nether is disabled. (#1826)
tastybento Aug 16, 2021
e0d6e4d
Merge branch 'master' into develop
tastybento Aug 16, 2021
b906f55
Hex pr 1820 (#1822)
tastybento Aug 19, 2021
c635647
Fix @since for subflags. (#1831)
BONNe Aug 19, 2021
705693f
Add Citizens to Softdepend list for NPC support (#1834)
Fredthedoggy Aug 21, 2021
6c75733
Fix color test.
tastybento Aug 21, 2021
876ba91
Set the default game mode when player makes island.
tastybento Aug 24, 2021
773f039
Corrects JavaDocs link
tastybento Aug 26, 2021
ed4cc0e
Update to 3.3.1-SNAPSHOT for shade plugin.
tastybento Aug 29, 2021
0341515
Package info files for better JavaDocs (#1839)
tastybento Aug 29, 2021
fa41abc
Implement Flag icon changing via Locales file. (#1829)
BONNe Aug 29, 2021
faf351f
Support glowing ink in blueprints (#1842)
tastybento Aug 29, 2021
2607256
Panel template (#1841)
BONNe Aug 29, 2021
44f06f2
Fix version command to show addon state.
tastybento Aug 29, 2021
a9a7673
Fix German flag banner description.
tastybento Aug 29, 2021
9dc4ebc
Make variables final if they can be. (#1843)
tastybento Aug 30, 2021
2385750
Static code analysis (#1844)
tastybento Aug 30, 2021
5bb12d5
Prevent home teleport when already home teleporting
tastybento Sep 3, 2021
547c266
Extracted island info from the Island object.
tastybento Sep 4, 2021
0f7ca6a
Slimmer trimmer island info for players.
tastybento Sep 4, 2021
23522a2
Fixes coop and trust invites when team invites are not allowed
tastybento Sep 4, 2021
7621677
Remove invulnerable visitor protection if island is in PVP mode
tastybento Sep 4, 2021
74ded5a
Fixes NPE in admin tp if nether or end worlds don't exist.
tastybento Sep 4, 2021
7d7882c
Adds arrow sound when teleporting into a PVP island.
tastybento Sep 4, 2021
e77a40f
Fix PVPListenerTest
tastybento Sep 4, 2021
28cecc2
Fix test failure in InvincibleVisitorsListenerTest
tastybento Sep 4, 2021
0844e97
Minor JavaDoc correction.
tastybento Sep 4, 2021
184c86b
Go command was not working second time.
tastybento Sep 5, 2021
9389401
Prevents console errors for missing icons in locale files.
tastybento Sep 5, 2021
23e3554
Fixes PlAddon disabling issue. (#1847)
BONNe Sep 6, 2021
3650863
Clear code - set worlds once on construction.
tastybento Sep 9, 2021
6bf3264
Fixes a bug when Potion metadata was not applied (#1849)
BONNe Sep 9, 2021
9da3293
Adds force-shown lines to the template. (#1850)
BONNe Sep 9, 2021
6bff4c8
Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.g…
tastybento Sep 9, 2021
b24c1fd
Use final vars for lambdas to avoid them changing async
tastybento Sep 9, 2021
e71d67d
Remove travis.
tastybento Sep 9, 2021
2b452cd
Version 1.17.4
tastybento Sep 11, 2021
3dd9e97
Island range perms could be 2x island distance
tastybento Sep 11, 2021
7271096
Ensure maxEverProtectionRange is less than range.
tastybento Sep 11, 2021
0e744ca
Added test class for Island.
tastybento Sep 13, 2021
c7a1220
Added access to private fields for JUnit tests
tastybento Sep 13, 2021
5c063a6
Added Sonar Properties to POM
tastybento Sep 13, 2021
005007b
Changes to analyze using sonar.
tastybento Sep 13, 2021
5b838d0
Remove zip reference
tastybento Sep 13, 2021
bb7f124
Avoid zipSlip vulnerability.
tastybento Sep 13, 2021
063fa97
Removed the unused WorldEdit hook. (#1853)
tastybento Sep 14, 2021
02a14ca
Requires nonNull parameters for User.instanceOf (#1852)
tastybento Sep 16, 2021
d926323
Fix JavaDoc for GameModeAddon inWorld method
tastybento Sep 16, 2021
3282b1b
Fix max-range bug
tastybento Sep 18, 2021
4f22df0
Remove illegal tag as it's not needed
tastybento Sep 18, 2021
8eb45e8
Code smell reduction
tastybento Sep 18, 2021
cad7dc1
Add missing packages so tests can pass.
tastybento Sep 18, 2021
25fe86d
Non null user methods (#1856)
tastybento Sep 18, 2021
8eac507
Null check
tastybento Sep 18, 2021
68890eb
Fix test
tastybento Sep 18, 2021
b247b36
Fix test.
tastybento Sep 18, 2021
53f02ae
Npe squashing (#1857)
tastybento Sep 19, 2021
110a282
Use isPlayer instead of null check.
tastybento Sep 19, 2021
f6f5b63
Fix
tastybento Sep 19, 2021
29fa039
Fix some code smells.
tastybento Sep 20, 2021
690ea2f
Prevent NPE possibility.
tastybento Sep 20, 2021
16d5775
Fix "ugly" enchant name. (#1858)
BONNe Sep 23, 2021
3d2a99c
Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.g…
tastybento Sep 25, 2021
bc737d4
Remove deprecated events.
tastybento Sep 25, 2021
8b47483
Fix IslandSethomeCommand test
tastybento Sep 25, 2021
0a4fc83
Fix tests - just counts of events.
tastybento Sep 25, 2021
af3c0a8
Added API to get a translation without color conversion
tastybento Sep 25, 2021
500f729
Fix tests.
tastybento Sep 25, 2021
3236c68
Fix test.
tastybento Sep 25, 2021
f66eeed
Version NPE protections.
tastybento Sep 25, 2021
d780bbd
1.18.0 (#1860)
tastybento Sep 26, 2021
bc6ec36
Fix missing color conversion for translations.
tastybento Oct 3, 2021
b5fd992
Fix mis-statement of island protection coordinates in info command.
tastybento Oct 3, 2021
a1c3f78
Fix tests
tastybento Oct 3, 2021
3c65194
Fix missing edge deletion of island.
tastybento Oct 3, 2021
60c62a5
Prevent rare NPE
tastybento Oct 3, 2021
3a43c40
Ensure oldIsland is never null.
tastybento Oct 3, 2021
cfad987
Refactored setowner command and added test class
tastybento Oct 4, 2021
b5d9d2e
API: Require getWorldSettings to be a game mode world
tastybento Oct 4, 2021
fe2e9e1
Fix tests and refactor code
tastybento Oct 9, 2021
665724e
Fix test
tastybento Oct 9, 2021
d3e7b55
Fix test
tastybento Oct 9, 2021
536d7ef
Put default getHandlers back in for backwards compatibility
tastybento Oct 9, 2021
f37226b
Refactor code for clarity.
tastybento Oct 9, 2021
db464d5
NPE protections
tastybento Oct 9, 2021
765f774
Prevent NPE
tastybento Oct 12, 2021
8852b9d
Throw an error if player is null
tastybento Oct 12, 2021
907c6b3
Prevent NPE
tastybento Oct 12, 2021
2ffa4c9
Prevent NPE
tastybento Oct 12, 2021
081f745
Do a null check
tastybento Oct 12, 2021
28a2ecf
World should never be null.
tastybento Oct 12, 2021
37e7846
Require non-null world
tastybento Oct 12, 2021
1a802a7
Require owner to be non-null. It should never be null
tastybento Oct 12, 2021
731d902
Prevent NPEs
tastybento Oct 12, 2021
930433b
Clear the going home flag for edge cases
tastybento Oct 17, 2021
6aa7869
Shift priority of EntityPortalEnterEvent to HIGH
tastybento Oct 23, 2021
8752e19
Increase priority of EntityPortalEvent listener
tastybento Oct 27, 2021
1953caa
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1868
tastybento Oct 30, 2021
5e3cffb
Code refactoring around User.getInstance(player)
tastybento Oct 30, 2021
22c62c9
Merge branch 'master' into develop
tastybento Nov 11, 2021
7b1c19c
Version 1.18.1
tastybento Nov 11, 2021
f3a7ed1
Added snapshot repo to Maven info.
tastybento Nov 11, 2021
6b6ab71
Fixes console teleporting.
tastybento Nov 11, 2021
7616f6a
Address potential NPE's
tastybento Nov 12, 2021
7277432
Preveent NPEs and other items.
tastybento Nov 12, 2021
2d03252
Remove dead paper forks (#1884)
Fredthedoggy Dec 5, 2021
de951b6
Added toString to resolve issue with arrays
tastybento Dec 5, 2021
79abf96
Fix minor JavaDoc mistake
tastybento Dec 5, 2021
59de6a8
Update to Minecraft 1.18 (#1887)
tastybento Dec 6, 2021
3b64973
Make BlockEndDragon support custom max world height (#1888)
BONNe Dec 6, 2021
8a6cc39
Send PVP toggle messages only to on-island players.
tastybento Dec 8, 2021
524cb46
Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.g…
tastybento Dec 8, 2021
6567104
Add 1.18.1
tastybento Dec 11, 2021
d0b0657
Merge branch 'master' into 1.19.0
tastybento Dec 12, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<powermock.version>2.0.9</powermock.version>
<mongodb.version>3.12.8</mongodb.version>
<!-- More visible way to change dependency versions -->
<spigot.version>1.17-R0.1-SNAPSHOT</spigot.version>
<spigot.version>1.18-R0.1-SNAPSHOT</spigot.version>
<!-- Might differ from the last Spigot release for short periods
of time -->
<paper.version>1.16.5-R0.1-SNAPSHOT</paper.version>
Expand All @@ -83,7 +83,7 @@
<!-- Do not change unless you want different name for local builds. -->
<build.number>-LOCAL</build.number>
<!-- This allows to change between versions. -->
<build.version>1.18.1</build.version>
<build.version>1.19.0</build.version>
<sonar.organization>bentobox-world</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
</properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import org.bukkit.Location;
import org.bukkit.Particle;

import com.google.common.base.Enums;

import world.bentobox.bentobox.api.commands.CompositeCommand;
import world.bentobox.bentobox.api.user.User;
import world.bentobox.bentobox.database.objects.Island;
Expand All @@ -22,6 +24,8 @@ public class AdminRangeDisplayCommand extends CompositeCommand {
private static final String DISPLAY = "display";
private static final String SHOW = "show";
private static final String HIDE = "hide";
// Since 1.18, the Particle.BARRIER was replaced by BLOCK_MARKER
private static final Particle BARRIER = Enums.getIfPresent(Particle.class, "BARRIER").or(Enums.getIfPresent(Particle.class, "BLOCK_MARKER").or(Particle.LAVA));

// Map of users to which ranges must be displayed
private final Map<User, Integer> displayRanges = new HashMap<>();
Expand All @@ -46,15 +50,15 @@ public boolean execute(User user, String label, List<String> args) {

if (!displayRanges.containsKey(user)) {
switch (label) {
case DISPLAY, SHOW -> showZones(user);
case HIDE -> user.sendMessage("commands.admin.range.display.already-off");
default -> showHelp(this, user);
case DISPLAY, SHOW -> showZones(user);
case HIDE -> user.sendMessage("commands.admin.range.display.already-off");
default -> showHelp(this, user);
}
} else {
switch (label) {
case DISPLAY, HIDE -> hideZones(user);
case SHOW -> user.sendMessage("commands.admin.range.display.already-on");
default -> showHelp(this, user);
case DISPLAY, HIDE -> hideZones(user);
case SHOW -> user.sendMessage("commands.admin.range.display.already-on");
default -> showHelp(this, user);
}
}

Expand All @@ -71,7 +75,7 @@ private void showZones(User user) {

getIslands().getIslandAt(user.getLocation()).ifPresent(island -> {
// Draw the island protected area
drawZone(user, Particle.BARRIER, null, island, island.getProtectionRange());
drawZone(user, BARRIER, null, island, island.getProtectionRange());

// Draw the default protected area if island protected zone is different
if (island.getProtectionRange() != getPlugin().getIWM().getIslandProtectionRange(getWorld())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ private void testLocation(Location location) {
World w = location.getWorld();
if (w == null || !plugin.getIWM().isIslandEnd(w)
|| !Flags.REMOVE_END_EXIT_ISLAND.isSetForWorld(w)
|| w.getBlockAt(0, 255, 0).getType().equals(Material.END_PORTAL)) {
|| w.getBlockAt(0, w.getMaxHeight() - 1, 0).getType().equals(Material.END_PORTAL)) {
return;
}

// Setting a End Portal at the top will trick dragon legacy check.
w.getBlockAt(0, 255, 0).setType(Material.END_PORTAL, false);
w.getBlockAt(0, w.getMaxHeight() - 1, 0).setType(Material.END_PORTAL, false);
}

/**
Expand All @@ -68,9 +68,9 @@ public void onEndBlockPlace(BlockPlaceEvent e) {
}

private boolean testBlock(Block block) {
return block.getY() == 255
&& block.getX() == 0
return block.getX() == 0
&& block.getZ() == 0
&& block.getY() == block.getWorld().getMaxHeight() - 1
&& block.getWorld().getEnvironment().equals(Environment.THE_END)
&& Flags.REMOVE_END_EXIT_ISLAND.isSetForWorld(block.getWorld())
&& plugin.getIWM().inWorld(block.getWorld())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ public void onPVPFlagToggle(final FlagSettingChangeEvent e) {
String message = "protection.flags." + flag.getID() + "." + (e.isSetTo() ? "enabled" : "disabled");
// Send the message to visitors
e.getIsland().getVisitors().forEach(visitor -> User.getInstance(visitor).sendMessage(message));
// Send the message to island members (and coops and trusted)
e.getIsland().getMemberSet(RanksManager.COOP_RANK).forEach(member -> User.getInstance(member).sendMessage(message));
// Send the message to players on the island
e.getIsland().getPlayersOnIsland().forEach(player -> User.getInstance(player).sendMessage(message));
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package world.bentobox.bentobox.nms.v1_17_R1;
package world.bentobox.bentobox.nms.v1_18_R1;

import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.block.data.BlockData;
import org.bukkit.craftbukkit.v1_17_R1.CraftWorld;
import org.bukkit.craftbukkit.v1_17_R1.block.data.CraftBlockData;
import org.bukkit.craftbukkit.v1_18_R1.CraftWorld;
import org.bukkit.craftbukkit.v1_18_R1.block.data.CraftBlockData;

import net.minecraft.core.BlockPosition;
import net.minecraft.world.level.World;
Expand All @@ -21,11 +21,11 @@ public class NMSHandler implements NMSAbstraction {
public void setBlockInNativeChunk(org.bukkit.Chunk chunk, int x, int y, int z, BlockData blockData, boolean applyPhysics) {
CraftBlockData craft = (CraftBlockData) blockData;
World nmsWorld = ((CraftWorld) chunk.getWorld()).getHandle();
Chunk nmsChunk = nmsWorld.getChunkAt(chunk.getX(), chunk.getZ());
Chunk nmsChunk = nmsWorld.d(chunk.getX(), chunk.getZ());
BlockPosition bp = new BlockPosition((chunk.getX() << 4) + x, y, (chunk.getZ() << 4) + z);
// Setting the block to air before setting to another state prevents some console errors
nmsChunk.setType(bp, AIR, applyPhysics, true);
nmsChunk.setType(bp, craft.getState(), applyPhysics, true);
nmsChunk.a(bp, AIR, applyPhysics);
nmsChunk.a(bp, craft.getState(), applyPhysics);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -176,16 +176,24 @@ public enum ServerVersion {
/**
* @since 1.16.0
*/
V1_16_5(Compatibility.INCOMPATIBLE),
V1_16_5(Compatibility.NOT_SUPPORTED),

/**
* @since 1.17.0
*/
V1_17(Compatibility.COMPATIBLE),
V1_17(Compatibility.NOT_SUPPORTED),
/**
* @since 1.17.1
*/
V1_17_1(Compatibility.COMPATIBLE)
V1_17_1(Compatibility.SUPPORTED),
/**
* @since 1.19.0
*/
V1_18(Compatibility.COMPATIBLE),
/**
* @since 1.19.0
*/
V1_18_1(Compatibility.COMPATIBLE),
;

private final Compatibility compatibility;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ public void setUp() throws Exception {
when(block.getZ()).thenReturn(0);
when(block.getWorld()).thenReturn(world);
when(world.getBlockAt(anyInt(), anyInt(), anyInt())).thenReturn(block);
when(world.getMaxHeight()).thenReturn(256);
when(world.getEnvironment()).thenReturn(Environment.THE_END);
// Player
UUID uuid = UUID.randomUUID();
Expand Down