diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
deleted file mode 100644
index f1ee68845..000000000
--- a/.github/ISSUE_TEMPLATE.md
+++ /dev/null
@@ -1,101 +0,0 @@
----
-name: Bug/Issue report for PlotSquared
-about: Bug / Issue report about this plugin
-title: ''
-labels: "[?] Testing Required"
-assignees: ''
-
----
-
-
-
-
-
-
-
-# Bug Report Template:
-
-## Required Information section:
-> ALL FIELDS IN THIS SECTION ARE REQUIRED, and must contain appropriate information
-### Server config info (/plot debugpaste / file paste links):
-
-
-
-**/plot debugpaste:**
-
-### Server type:
-**Select one**
-
-- [] Spigot / Paper *(CraftBukkit should not be used, re-test with Spigot first!)*
-- [] Sponge
-- [] NukkitX
-
-### PlotSquared version:
-
-```
-Paste the output here, between the tick marks, replacing this text
-```
-
-### Minecraft Version:
-**Select one**
-
-- [] Minecraft 1.15.2
-- [] Minecraft 1.14.4
-- [] Minecraft 1.13.2
-- [] Minecraft 1.12.2
-- [] Minecraft 1.11.2
-- [] Minecraft 1.10.2
-- [] Minecraft 1.9.4
-- [] Minecraft 1.8.8
-- [] Minecraft Java Edition *other versions, please specify*:
-- [] Minecraft Bedrock Edition *specify version*:
-- [] Minecraft Sponge *specify version*:
-
-### Server build info:
-
-```
-Paste the output here, between the tick marks, replacing this text
-```
-
-### WorldEdit/FAWE versions:
-
-- [] FAWE version:
-- [] WorldEdit version:
-
-### Description of the problem:
-
-
-
-### How to replicate:
-
-
-## Additional Information:
-> The information here is optional for you to provide, however it may help us to more readily diagnose any compatibility and bug issues.
-
-### Other plugins being used on the server:
-
-
-### Relevant console output, log lines, and/or screenshots:
-
-
-### Additional relevant comments/remarks:
-
-
-# AFFIRMATION OF COMPLETION:
-
-- [] I included all information required in the sections above
-- [] I made sure there are no duplicates of this report [(Use Search)](https://github.com/IntellectualSites/PlotSquared/issues?utf8=%E2%9C%93&q=is%3Aissue)
-- [] I made sure I am using an up-to-date version of PlotSquared
-- [] I made sure the bug/error is not caused by any other plugin
-- [x] I didn't read but checked everything above.
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
deleted file mode 100644
index fd39e3738..000000000
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-blank_issues_enabled: false
-contact_links:
- - name: PlotSquared Issue Tracker
- url: https://issues.intellectualsites.com/projects/ps
- about: Click here to move to our new issue tracker
- - name: PlotSquared Suggestions
- url: https://github.com/IntellectualSites/PlotSquaredSuggestions
- about: If you want to submit feature or suggestion ideas, do that here
\ No newline at end of file
diff --git a/Bukkit/build.gradle b/Bukkit/build.gradle
index 61842d3ce..81ae0c3c0 100644
--- a/Bukkit/build.gradle
+++ b/Bukkit/build.gradle
@@ -6,7 +6,7 @@ repositories {
maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url = "https://jitpack.io" }
maven { url = "https://repo.codemc.org/repository/maven-public" }
- maven { url = "http://repo.extendedclip.com/content/repositories/placeholderapi/" }
+ maven { url = "https://repo.extendedclip.com/content/repositories/placeholderapi/" }
maven {
name = "papermc"
url = "https://papermc.io/repo/repository/maven-public/"
@@ -23,8 +23,8 @@ dependencies {
implementation(project(":PlotSquared-Core"))
compile("org.bstats:bstats-bukkit:1.7")
compile(project(":PlotSquared-Core"))
- compile("com.destroystokyo.paper:paper-api:1.16.1-R0.1-SNAPSHOT")
- implementation("org.spigotmc:spigot-api:1.16.1-R0.1-SNAPSHOT")
+ compile("com.destroystokyo.paper:paper-api:1.16.2-R0.1-SNAPSHOT")
+ implementation("org.spigotmc:spigot-api:1.16.2-R0.1-SNAPSHOT")
compile(group: "com.sk89q.worldedit", name: "worldedit-bukkit", version: "7.1.0") {
exclude(module: "bukkit")
@@ -36,7 +36,7 @@ dependencies {
}
implementation("me.clip:placeholderapi:2.10.6")
implementation("net.luckperms:api:5.1")
- implementation("net.ess3:EssentialsX:2.17.2") {
+ implementation("net.ess3:EssentialsX:2.18.0") {
exclude(group: "io.papermc", module: "paperlib")
}
implementation("net.alpenblock:BungeePerms:4.0-dev-106")
diff --git a/Bukkit/pom.xml b/Bukkit/pom.xml
index b62c1c094..9e3e54d9f 100644
--- a/Bukkit/pom.xml
+++ b/Bukkit/pom.xml
@@ -27,7 +27,7 @@
com.destroystokyo.paper
paper-api
- 1.16.1-R0.1-SNAPSHOT
+ 1.16.2-R0.1-SNAPSHOT
compile
@@ -149,7 +149,7 @@
org.spigotmc
spigot-api
- 1.16.1-R0.1-SNAPSHOT
+ 1.16.2-R0.1-SNAPSHOT
runtime
@@ -179,7 +179,7 @@
net.ess3
EssentialsX
- 2.17.2
+ 2.18.0
runtime
diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java b/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java
index f499f5d16..34cbcc5b3 100644
--- a/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java
+++ b/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java
@@ -770,6 +770,7 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain<
}
continue;
case "ZOMBIFIED_PIGLIN":
+ case "PIGLIN_BRUTE":
case "LLAMA":
case "DONKEY":
case "MULE":
diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/entity/ReplicatingEntityWrapper.java b/Bukkit/src/main/java/com/plotsquared/bukkit/entity/ReplicatingEntityWrapper.java
index 83740e9db..d82c274e9 100644
--- a/Bukkit/src/main/java/com/plotsquared/bukkit/entity/ReplicatingEntityWrapper.java
+++ b/Bukkit/src/main/java/com/plotsquared/bukkit/entity/ReplicatingEntityWrapper.java
@@ -310,6 +310,7 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
case "HOGLIN":
case "ZOMBIFIED_PIGLIN":
case "PIGLIN":
+ case "PIGLIN_BRUTE":
case "ZOMBIE":
case "WITHER":
case "WITCH":
@@ -711,6 +712,7 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
case "HOGLIN":
case "PIGLIN":
case "ZOMBIFIED_PIGLIN":
+ case "PIGLIN_BRUTE":
case "ZOMBIE":
case "WITHER":
case "WITCH":
diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEventListener.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEventListener.java
index c4d7c6d90..8392591b5 100644
--- a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEventListener.java
+++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEventListener.java
@@ -69,6 +69,7 @@ import com.plotsquared.core.util.MainUtil;
import com.plotsquared.core.util.MathMan;
import com.plotsquared.core.util.Permissions;
import com.plotsquared.core.util.PremiumVerification;
+import com.plotsquared.core.util.ReflectionUtils;
import com.plotsquared.core.util.RegExUtil;
import com.plotsquared.core.util.entity.EntityCategories;
import com.plotsquared.core.util.task.TaskManager;
@@ -139,6 +140,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.UUID;
+import java.util.function.Predicate;
import java.util.regex.Pattern;
/**
@@ -153,7 +155,15 @@ public class PlayerEventListener extends PlotListener implements Listener {
private PlayerMoveEvent moveTmp;
private String internalVersion;
+ private final Predicate isRealPlayerCheck;
+
{
+ Class> playerImplementation = ReflectionUtils.getCbClass("entity.CraftPlayer");
+ if (playerImplementation == null) {
+ isRealPlayerCheck = p -> true;
+ } else {
+ isRealPlayerCheck = p -> p.getClass() == playerImplementation;
+ }
try {
fieldPlayer = PlayerEvent.class.getDeclaredField("player");
fieldPlayer.setAccessible(true);
@@ -346,6 +356,9 @@ public class PlayerEventListener extends PlotListener implements Listener {
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onTeleport(PlayerTeleportEvent event) {
+ if (!isRealPlayerCheck.test(event.getPlayer())) {
+ return;
+ }
Player player = event.getPlayer();
BukkitPlayer pp = BukkitUtil.getPlayer(player);
Plot lastPlot = pp.getMeta(PlotPlayer.META_LAST_PLOT);
@@ -452,6 +465,9 @@ public class PlayerEventListener extends PlotListener implements Listener {
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void playerMove(PlayerMoveEvent event) {
+ if (!isRealPlayerCheck.test(event.getPlayer())) {
+ return;
+ }
org.bukkit.Location from = event.getFrom();
org.bukkit.Location to = event.getTo();
int x2;
@@ -643,6 +659,9 @@ public class PlayerEventListener extends PlotListener implements Listener {
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onWorldChanged(PlayerChangedWorldEvent event) {
+ if (!isRealPlayerCheck.test(event.getPlayer())) {
+ return;
+ }
Player player = event.getPlayer();
BukkitPlayer pp = BukkitUtil.getPlayer(player);
// Delete last location
diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/util/OfflinePlayerUtil.java b/Bukkit/src/main/java/com/plotsquared/bukkit/util/OfflinePlayerUtil.java
index 41ae4dedd..94a6acedf 100644
--- a/Bukkit/src/main/java/com/plotsquared/bukkit/util/OfflinePlayerUtil.java
+++ b/Bukkit/src/main/java/com/plotsquared/bukkit/util/OfflinePlayerUtil.java
@@ -63,11 +63,11 @@ public class OfflinePlayerUtil {
Object profile = newGameProfile(id, name);
Class> entityPlayerClass = getNmsClass("EntityPlayer");
Constructor entityPlayerConstructor =
- makeConstructor(entityPlayerClass, getNmsClass("MinecraftServer"),
- getNmsClass("WorldServer"), getUtilClass("com.mojang.authlib.GameProfile"),
- getNmsClass("PlayerInteractManager"));
+ makeConstructor(entityPlayerClass, getNmsClass("MinecraftServer"),
+ getNmsClass("WorldServer"), getUtilClass("com.mojang.authlib.GameProfile"),
+ getNmsClass("PlayerInteractManager"));
Object entityPlayer =
- callConstructor(entityPlayerConstructor, server, worldServer, profile, interactManager);
+ callConstructor(entityPlayerConstructor, server, worldServer, profile, interactManager);
return (Player) getBukkitEntity(entityPlayer);
}
@@ -97,6 +97,26 @@ public class OfflinePlayerUtil {
return callConstructor(c, worldServer);
}
+ public static Object getWorldServer116() {
+ Object server = getMinecraftServer();
+ Class> minecraftServerClass = getNmsClass("MinecraftServer");
+ Class> genericResourceKey = getNmsClass("ResourceKey");
+ Class> minecraftKey = getNmsClass("MinecraftKey");
+ // MinecraftKey + MinecraftKey -> ResourceKey
+ Method constructResourceKey = makeMethod(genericResourceKey, "a", minecraftKey, minecraftKey);
+ // MinecraftKey(String)
+ Constructor