mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 17:37:42 +01:00
Update to 1.16.1
This commit is contained in:
@@ -1,41 +1,41 @@
|
||||
From e03b6ebdad870f7d6c849061daed7f715e496918 Mon Sep 17 00:00:00 2001
|
||||
From 236214ae05f55fc6ae1305edf2eb85b1bcc5af66 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 4 May 2019 00:57:16 -0500
|
||||
Subject: [PATCH] Rebrand
|
||||
|
||||
---
|
||||
pom.xml | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
pom.xml | 13 ++++++-------
|
||||
1 file changed, 6 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index a2387a667..c4b9414fb 100644
|
||||
index dfc7c2f35..cb2dea442 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -3,18 +3,18 @@
|
||||
@@ -3,18 +3,17 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
- <groupId>com.tuinity</groupId>
|
||||
- <artifactId>tuinity-parent</artifactId>
|
||||
- <groupId>com.destroystokyo.paper</groupId>
|
||||
- <artifactId>paper-parent</artifactId>
|
||||
+ <groupId>net.pl3x.purpur</groupId>
|
||||
+ <artifactId>purpur-parent</artifactId>
|
||||
<version>dev-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
- <artifactId>tuinity-api</artifactId>
|
||||
- <groupId>com.destroystokyo.paper</groupId>
|
||||
- <artifactId>paper-api</artifactId>
|
||||
+ <artifactId>purpur-api</artifactId>
|
||||
<version>1.15.2-R0.1-SNAPSHOT</version>
|
||||
<version>1.16.1-R0.1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
- <name>Tuinity-API</name>
|
||||
- <url>https://github.com/Spottedleaf/Tuinity</url>
|
||||
- <name>Paper-API</name>
|
||||
- <url>https://github.com/PaperMC/Paper</url>
|
||||
+ <name>Purpur-API</name>
|
||||
+ <url>https://github.com/pl3xgaming/Purpur</url>
|
||||
<description>An enhanced plugin API for Minecraft servers.</description>
|
||||
|
||||
<properties>
|
||||
@@ -149,7 +149,7 @@
|
||||
@@ -149,7 +148,7 @@
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
@@ -1,61 +0,0 @@
|
||||
From 77e67dca85182e9899eba3e4065cabbe4e072e0d Mon Sep 17 00:00:00 2001
|
||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
Date: Fri, 14 Dec 2018 21:52:29 -0800
|
||||
Subject: [PATCH] Tuinity API Changes
|
||||
|
||||
---
|
||||
pom.xml | 12 ++++++------
|
||||
src/main/java/org/bukkit/Server.java | 8 ++++++++
|
||||
2 files changed, 14 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 20c473f52..a2387a667 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -3,18 +3,18 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
- <groupId>com.destroystokyo.paper</groupId>
|
||||
- <artifactId>paper-parent</artifactId>
|
||||
+ <groupId>com.tuinity</groupId>
|
||||
+ <artifactId>tuinity-parent</artifactId>
|
||||
<version>dev-SNAPSHOT</version>
|
||||
+ <relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
- <groupId>com.destroystokyo.paper</groupId>
|
||||
- <artifactId>paper-api</artifactId>
|
||||
+ <artifactId>tuinity-api</artifactId>
|
||||
<version>1.15.2-R0.1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
- <name>Paper-API</name>
|
||||
- <url>https://github.com/PaperMC/Paper</url>
|
||||
+ <name>Tuinity-API</name>
|
||||
+ <url>https://github.com/Spottedleaf/Tuinity</url>
|
||||
<description>An enhanced plugin API for Minecraft servers.</description>
|
||||
|
||||
<properties>
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index cc06492f4..cf20e7541 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1396,6 +1396,14 @@ public interface Server extends PluginMessageRecipient {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
+ // Tuinity start - add config to timings report
|
||||
+ @NotNull
|
||||
+ public org.bukkit.configuration.file.YamlConfiguration getTuinityConfig()
|
||||
+ {
|
||||
+ throw new UnsupportedOperationException("Not supported yet.");
|
||||
+ }
|
||||
+ // Tuinity end - add config to timings report
|
||||
+
|
||||
/**
|
||||
* Sends the component to the player
|
||||
*
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From bc7ef0c8f2a4e9310cac260ba83bd2534a77d49f Mon Sep 17 00:00:00 2001
|
||||
From 207d7356ada158abb9151799b2c290cef7e465d0 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Tue, 18 Feb 2020 20:30:03 -0600
|
||||
Subject: [PATCH] Purpur config files
|
||||
@@ -8,12 +8,12 @@ Subject: [PATCH] Purpur config files
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index cf20e7541..ab1d082a4 100644
|
||||
index b464cc1a7..1a05a438c 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1404,6 +1404,18 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1424,6 +1424,18 @@ public interface Server extends PluginMessageRecipient {
|
||||
}
|
||||
// Tuinity end - add config to timings report
|
||||
// Paper end
|
||||
|
||||
+ // Purpur start
|
||||
+ @NotNull
|
||||
@@ -1,4 +1,4 @@
|
||||
From 465547cca4e6f15f94abbc98fa5dbf0a5f7d2447 Mon Sep 17 00:00:00 2001
|
||||
From 77cf864ad36201a94e3c8ac0535064c98e5c175a Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Fri, 5 Jun 2020 23:32:38 -0500
|
||||
Subject: [PATCH] Default permissions
|
||||
@@ -6,8 +6,8 @@ Subject: [PATCH] Default permissions
|
||||
---
|
||||
.../util/permissions/CommandPermissions.java | 1 +
|
||||
.../util/permissions/DefaultPermissions.java | 2 +
|
||||
.../util/permissions/PurpurPermissions.java | 62 +++++++++++++++++++
|
||||
3 files changed, 65 insertions(+)
|
||||
.../util/permissions/PurpurPermissions.java | 69 +++++++++++++++++++
|
||||
3 files changed, 72 insertions(+)
|
||||
create mode 100644 src/main/java/org/bukkit/util/permissions/PurpurPermissions.java
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/util/permissions/CommandPermissions.java b/src/main/java/org/bukkit/util/permissions/CommandPermissions.java
|
||||
@@ -37,10 +37,10 @@ index e1a4ddf2c..8e481e381 100644
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/util/permissions/PurpurPermissions.java b/src/main/java/org/bukkit/util/permissions/PurpurPermissions.java
|
||||
new file mode 100644
|
||||
index 000000000..64fdd9230
|
||||
index 000000000..14cb78e3e
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/bukkit/util/permissions/PurpurPermissions.java
|
||||
@@ -0,0 +1,62 @@
|
||||
@@ -0,0 +1,69 @@
|
||||
+package org.bukkit.util.permissions;
|
||||
+
|
||||
+import org.bukkit.entity.Entity;
|
||||
@@ -71,6 +71,13 @@ index 000000000..64fdd9230
|
||||
+ public static Permission registerPermissions() {
|
||||
+ Permission purpur = DefaultPermissions.registerPermission(ROOT, "Gives the user the ability to use all Purpur utilities and commands");
|
||||
+
|
||||
+ DefaultPermissions.registerPermission(PREFIX + "enderchest.rows.six", "Gives the user six rows of enderchest space", org.bukkit.permissions.PermissionDefault.FALSE);
|
||||
+ DefaultPermissions.registerPermission(PREFIX + "enderchest.rows.five", "Gives the user five rows of enderchest space", org.bukkit.permissions.PermissionDefault.FALSE);
|
||||
+ DefaultPermissions.registerPermission(PREFIX + "enderchest.rows.four", "Gives the user four rows of enderchest space", org.bukkit.permissions.PermissionDefault.FALSE);
|
||||
+ DefaultPermissions.registerPermission(PREFIX + "enderchest.rows.three", "Gives the user three rows of enderchest space", org.bukkit.permissions.PermissionDefault.FALSE);
|
||||
+ DefaultPermissions.registerPermission(PREFIX + "enderchest.rows.two", "Gives the user two rows of enderchest space", org.bukkit.permissions.PermissionDefault.FALSE);
|
||||
+ DefaultPermissions.registerPermission(PREFIX + "enderchest.rows.one", "Gives the user one row of enderchest space", org.bukkit.permissions.PermissionDefault.FALSE);
|
||||
+
|
||||
+ DefaultPermissions.registerPermission(PREFIX + "debug.f3n", "Allows the user to use F3+N keybind to swap gamemodes", PermissionDefault.FALSE, purpur);
|
||||
+
|
||||
+ DefaultPermissions.registerPermission(PREFIX + "drop.spawner", "Allows the user to drop spawner cage when broken with diamond pickaxe with silk touch", PermissionDefault.FALSE, purpur);
|
||||
@@ -1,4 +1,4 @@
|
||||
From b188d7fb384b09a447261d6efcf8c65258799677 Mon Sep 17 00:00:00 2001
|
||||
From 683682367df0d1ec0605b5d75398d9a3f096ca2a Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Tue, 23 Jul 2019 06:50:55 -0500
|
||||
Subject: [PATCH] Allow inventory resizing
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH] Allow inventory resizing
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryType.java b/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
||||
index 10c3b6d75..931e5ff7b 100644
|
||||
index b59fec1ae..e3b77f565 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
||||
+++ b/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
||||
@@ -128,7 +128,7 @@ public enum InventoryType {
|
||||
@@ -132,7 +132,7 @@ public enum InventoryType {
|
||||
STONECUTTER(2, "Stonecutter")
|
||||
;
|
||||
|
||||
@@ -20,7 +20,7 @@ index 10c3b6d75..931e5ff7b 100644
|
||||
private final String title;
|
||||
private final boolean isCreatable;
|
||||
|
||||
@@ -142,6 +142,12 @@ public enum InventoryType {
|
||||
@@ -146,6 +146,12 @@ public enum InventoryType {
|
||||
this.isCreatable = isCreatable;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From a05e6fbef6eb46c46f84a91c09731a0d28ad8c2e Mon Sep 17 00:00:00 2001
|
||||
From c43598530aeb734560bda5aa9e33ba4ecc18ed2a Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Fri, 31 May 2019 21:24:21 -0500
|
||||
Subject: [PATCH] Advancement API Additions
|
||||
Subject: [PATCH] Advancement API
|
||||
|
||||
---
|
||||
.../org/bukkit/advancement/Advancement.java | 9 ++++
|
||||
@@ -1,120 +0,0 @@
|
||||
From 0c20fdc1cc34d29b9135326be5db514107bb6766 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 4 May 2019 00:57:16 -0500
|
||||
Subject: [PATCH] Ridables
|
||||
|
||||
---
|
||||
.../paper/entity/ai/VanillaGoal.java | 4 ++
|
||||
.../event/entity/RidableSpacebarEvent.java | 37 ++++++++++++++++++
|
||||
src/main/java/org/bukkit/entity/Entity.java | 38 +++++++++++++++++++
|
||||
3 files changed, 79 insertions(+)
|
||||
create mode 100644 src/main/java/net/pl3x/purpur/event/entity/RidableSpacebarEvent.java
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
|
||||
index d23ad96ee..36d37e9a3 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
|
||||
@@ -154,6 +154,10 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
|
||||
GoalKey<Mob> FOLLOW_ENTITY = GoalKey.of(Mob.class, NamespacedKey.minecraft("follow_entity"));
|
||||
GoalKey<Tameable> FOLLOW_OWNER = GoalKey.of(Tameable.class, NamespacedKey.minecraft("follow_owner"));
|
||||
GoalKey<Animals> FOLLOW_PARENT = GoalKey.of(Animals.class, NamespacedKey.minecraft("follow_parent"));
|
||||
+ // Purpur start
|
||||
+ GoalKey<Phantom> FIND_CRYSTAL_GOAL = GoalKey.of(Phantom.class, NamespacedKey.minecraft("find_crystal_goal"));
|
||||
+ GoalKey<Phantom> ORBIT_CRYSTAL_GOAL = GoalKey.of(Phantom.class, NamespacedKey.minecraft("orbit_crystal_goal"));
|
||||
+ // Purpur end
|
||||
GoalKey<SkeletonHorse> HORSE_TRAP = GoalKey.of(SkeletonHorse.class, NamespacedKey.minecraft("horse_trap"));
|
||||
GoalKey<Creature> HURT_BY_TARGET = GoalKey.of(Creature.class, NamespacedKey.minecraft("hurt_by_target"));
|
||||
GoalKey<Mob> INTERACT = GoalKey.of(Mob.class, NamespacedKey.minecraft("interact"));
|
||||
diff --git a/src/main/java/net/pl3x/purpur/event/entity/RidableSpacebarEvent.java b/src/main/java/net/pl3x/purpur/event/entity/RidableSpacebarEvent.java
|
||||
new file mode 100644
|
||||
index 000000000..c0ec5a130
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/pl3x/purpur/event/entity/RidableSpacebarEvent.java
|
||||
@@ -0,0 +1,37 @@
|
||||
+package net.pl3x.purpur.event.entity;
|
||||
+
|
||||
+import org.bukkit.entity.Entity;
|
||||
+import org.bukkit.event.Cancellable;
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.bukkit.event.entity.EntityEvent;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+
|
||||
+public class RidableSpacebarEvent extends EntityEvent implements Cancellable {
|
||||
+ private static final HandlerList handlers = new HandlerList();
|
||||
+ private boolean cancelled;
|
||||
+
|
||||
+ public RidableSpacebarEvent(@NotNull Entity entity) {
|
||||
+ super(entity);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isCancelled() {
|
||||
+ return cancelled;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setCancelled(boolean cancel) {
|
||||
+ cancelled = cancel;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ @NotNull
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 3f0f38031..25372c58b 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -659,4 +659,42 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@NotNull
|
||||
org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason getEntitySpawnReason();
|
||||
// Paper end
|
||||
+
|
||||
+ // Purpur start
|
||||
+ /**
|
||||
+ * Get the riding player
|
||||
+ *
|
||||
+ * @return Riding player
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ Player getRider();
|
||||
+
|
||||
+ /**
|
||||
+ * Check if entity is being ridden
|
||||
+ *
|
||||
+ * @return True if being ridden
|
||||
+ */
|
||||
+ boolean hasRider();
|
||||
+
|
||||
+ /**
|
||||
+ * Check if entity is ridable
|
||||
+ *
|
||||
+ * @return True if ridable
|
||||
+ */
|
||||
+ boolean isRidable();
|
||||
+
|
||||
+ /**
|
||||
+ * Check if entity is ridable in water
|
||||
+ *
|
||||
+ * @return True if ridable in water
|
||||
+ */
|
||||
+ boolean isRidableInWater();
|
||||
+
|
||||
+ /**
|
||||
+ * Check if shift is required to mount this entity
|
||||
+ *
|
||||
+ * @return True if shift is required
|
||||
+ */
|
||||
+ boolean requireShiftToMount();
|
||||
+ // Purpur end
|
||||
}
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From db2a7cb27f0b3422bfd8f786c8eb23ad55fc198c Mon Sep 17 00:00:00 2001
|
||||
From 3efaae899100095ab241d17882103707e439d625 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Fri, 18 Oct 2019 22:50:05 -0500
|
||||
Subject: [PATCH] Add more llama API
|
||||
Subject: [PATCH] Llama API
|
||||
|
||||
---
|
||||
.../event/entity/LlamaJoinCaravanEvent.java | 61 ++++++++++++++++++
|
||||
@@ -1,142 +0,0 @@
|
||||
From acabe1261f9db72988a29d0d72ee138b7c0cf221 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Tue, 31 Dec 2019 23:00:07 -0600
|
||||
Subject: [PATCH] Remove pointless annotations and deprecations
|
||||
|
||||
---
|
||||
src/main/java/org/bukkit/Bukkit.java | 3 ---
|
||||
src/main/java/org/bukkit/Server.java | 3 ---
|
||||
src/main/java/org/bukkit/command/CommandExecutor.java | 2 +-
|
||||
src/main/java/org/bukkit/command/TabCompleter.java | 2 +-
|
||||
src/main/java/org/bukkit/inventory/ItemStack.java | 8 --------
|
||||
src/main/java/org/bukkit/plugin/java/JavaPlugin.java | 4 ++--
|
||||
src/test/java/org/bukkit/AnnotationTest.java | 5 +++++
|
||||
7 files changed, 9 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index a9c10228e..780d603e4 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -863,13 +863,10 @@ public final class Bukkit {
|
||||
* This will return an object even if the player does not exist. To this
|
||||
* method, all players will exist.
|
||||
*
|
||||
- * @deprecated Persistent storage of users should be by UUID as names are no longer
|
||||
- * unique past a single session.
|
||||
* @param name the name the player to retrieve
|
||||
* @return an offline player
|
||||
* @see #getOfflinePlayer(java.util.UUID)
|
||||
*/
|
||||
- @Deprecated
|
||||
@NotNull
|
||||
public static OfflinePlayer getOfflinePlayer(@NotNull String name) {
|
||||
return server.getOfflinePlayer(name);
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index ab1d082a4..a4cf71fb4 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -722,13 +722,10 @@ public interface Server extends PluginMessageRecipient {
|
||||
* This will return an object even if the player does not exist. To this
|
||||
* method, all players will exist.
|
||||
*
|
||||
- * @deprecated Persistent storage of users should be by UUID as names are no longer
|
||||
- * unique past a single session.
|
||||
* @param name the name the player to retrieve
|
||||
* @return an offline player
|
||||
* @see #getOfflinePlayer(java.util.UUID)
|
||||
*/
|
||||
- @Deprecated
|
||||
@NotNull
|
||||
public OfflinePlayer getOfflinePlayer(@NotNull String name);
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/command/CommandExecutor.java b/src/main/java/org/bukkit/command/CommandExecutor.java
|
||||
index 45cb8da12..383b43e1b 100644
|
||||
--- a/src/main/java/org/bukkit/command/CommandExecutor.java
|
||||
+++ b/src/main/java/org/bukkit/command/CommandExecutor.java
|
||||
@@ -19,5 +19,5 @@ public interface CommandExecutor {
|
||||
* @param args Passed command arguments
|
||||
* @return true if a valid command, otherwise false
|
||||
*/
|
||||
- public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args);
|
||||
+ public boolean onCommand(CommandSender sender, Command command, String label, String[] args); // Purpur - remove pointless annotations
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/command/TabCompleter.java b/src/main/java/org/bukkit/command/TabCompleter.java
|
||||
index e9cf71f5c..34d3462c7 100644
|
||||
--- a/src/main/java/org/bukkit/command/TabCompleter.java
|
||||
+++ b/src/main/java/org/bukkit/command/TabCompleter.java
|
||||
@@ -23,5 +23,5 @@ public interface TabCompleter {
|
||||
* to default to the command executor
|
||||
*/
|
||||
@Nullable
|
||||
- public List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String alias, @NotNull String[] args);
|
||||
+ public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args); // Purpur - remove pointless annotations
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index ccd81fca2..a8ade268c 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -204,13 +204,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
|
||||
* Sets the durability of this item
|
||||
*
|
||||
* @param durability Durability of this item
|
||||
- * @deprecated durability is now part of ItemMeta. To avoid confusion and
|
||||
- * misuse, {@link #getItemMeta()}, {@link #setItemMeta(ItemMeta)} and
|
||||
- * {@link Damageable#setDamage(int)} should be used instead. This is because
|
||||
- * any call to this method will be overwritten by subsequent setting of
|
||||
- * ItemMeta which was created before this call.
|
||||
*/
|
||||
- @Deprecated
|
||||
public void setDurability(final short durability) {
|
||||
ItemMeta meta = getItemMeta();
|
||||
if (meta != null) {
|
||||
@@ -223,9 +217,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
|
||||
* Gets the durability of this item
|
||||
*
|
||||
* @return Durability of this item
|
||||
- * @deprecated see {@link #setDurability(short)}
|
||||
*/
|
||||
- @Deprecated
|
||||
public short getDurability() {
|
||||
ItemMeta meta = getItemMeta();
|
||||
return (meta == null) ? 0 : (short) ((Damageable) meta).getDamage();
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
|
||||
index 04fa3991f..24d65491c 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
|
||||
@@ -287,7 +287,7 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
- public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
|
||||
+ public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { // Purpur - remove pointless annotations
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -296,7 +296,7 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
*/
|
||||
@Override
|
||||
@Nullable
|
||||
- public List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String alias, @NotNull String[] args) {
|
||||
+ public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) { // Purpur - remove pointless annotations
|
||||
return null;
|
||||
}
|
||||
|
||||
diff --git a/src/test/java/org/bukkit/AnnotationTest.java b/src/test/java/org/bukkit/AnnotationTest.java
|
||||
index a48be38b1..951b81e79 100644
|
||||
--- a/src/test/java/org/bukkit/AnnotationTest.java
|
||||
+++ b/src/test/java/org/bukkit/AnnotationTest.java
|
||||
@@ -41,6 +41,11 @@ public class AnnotationTest {
|
||||
"org/bukkit/plugin/java/PluginClassLoader",
|
||||
// Generic functional interface
|
||||
"org/bukkit/util/Consumer",
|
||||
+ // Purpur start
|
||||
+ "org/bukkit/command/CommandExecutor",
|
||||
+ "org/bukkit/command/TabCompleter",
|
||||
+ "org/bukkit/plugin/java/JavaPlugin",
|
||||
+ // Purpur end
|
||||
// Paper start
|
||||
// Timings history is broken in terms of nullability due to guavas Function defining that the param is NonNull
|
||||
"co/aikar/timings/TimingHistory$2",
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From f6443249943ce18e3d4b7379852b7aadf34262a7 Mon Sep 17 00:00:00 2001
|
||||
From bbc865bdfdd716cc526fbd7cc57e6eb0841d9926 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 19 Oct 2019 00:28:53 -0500
|
||||
Subject: [PATCH] Add more evoker API
|
||||
Subject: [PATCH] Evoker API
|
||||
|
||||
---
|
||||
src/main/java/org/bukkit/entity/Evoker.java | 17 +++++++++++++++++
|
||||
@@ -1,7 +1,7 @@
|
||||
From d94af99f8daf2617cad173e2a3f6400b213e5ae1 Mon Sep 17 00:00:00 2001
|
||||
From b01aba9c3138bfcde84036b1fbed0ec910617913 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 10 Aug 2019 22:19:56 -0500
|
||||
Subject: [PATCH] Implement AFK API
|
||||
Subject: [PATCH] AFK API
|
||||
|
||||
---
|
||||
.../net/pl3x/purpur/event/PlayerAFKEvent.java | 70 +++++++++++++++++++
|
||||
@@ -86,10 +86,10 @@ index 000000000..0c8b3e5e4
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 787bb144b..edc481170 100644
|
||||
index 2eb312138..2dca16ac4 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -1830,4 +1830,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1870,4 +1870,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@Override
|
||||
Spigot spigot();
|
||||
// Spigot end
|
||||
@@ -1,59 +0,0 @@
|
||||
From e503ea72858416dd97bd79c5aae85a2834f11195 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sat, 11 Jan 2020 23:12:00 -0600
|
||||
Subject: [PATCH] Add EntityPortalReadyEvent
|
||||
|
||||
---
|
||||
.../event/entity/EntityPortalReadyEvent.java | 40 +++++++++++++++++++
|
||||
1 file changed, 40 insertions(+)
|
||||
create mode 100644 src/main/java/net/pl3x/purpur/event/entity/EntityPortalReadyEvent.java
|
||||
|
||||
diff --git a/src/main/java/net/pl3x/purpur/event/entity/EntityPortalReadyEvent.java b/src/main/java/net/pl3x/purpur/event/entity/EntityPortalReadyEvent.java
|
||||
new file mode 100644
|
||||
index 000000000..37f11c104
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/pl3x/purpur/event/entity/EntityPortalReadyEvent.java
|
||||
@@ -0,0 +1,40 @@
|
||||
+package net.pl3x.purpur.event.entity;
|
||||
+
|
||||
+import org.bukkit.entity.Entity;
|
||||
+import org.bukkit.event.Cancellable;
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.bukkit.event.entity.EntityEvent;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+
|
||||
+/**
|
||||
+ * Called when an entity is ready to travel through a portal
|
||||
+ */
|
||||
+public class EntityPortalReadyEvent extends EntityEvent implements Cancellable {
|
||||
+ private static final HandlerList handlers = new HandlerList();
|
||||
+ private boolean cancelled = false;
|
||||
+
|
||||
+ public EntityPortalReadyEvent(@NotNull Entity entity) {
|
||||
+ super(entity);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isCancelled() {
|
||||
+ return cancelled;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setCancelled(boolean cancel) {
|
||||
+ this.cancelled = cancel;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 53733732e9661eb0f898887c88afd73b93a808f6 Mon Sep 17 00:00:00 2001
|
||||
From 964c8bd13a95dd17362e4c9bf98acc1a7662e008 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sun, 26 May 2019 15:18:40 -0500
|
||||
Subject: [PATCH] Bring back server name
|
||||
@@ -9,10 +9,10 @@ Subject: [PATCH] Bring back server name
|
||||
2 files changed, 20 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 780d603e4..33ccf2979 100644
|
||||
index 329e2dd1c..4f6f01939 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -1714,4 +1714,15 @@ public final class Bukkit {
|
||||
@@ -1749,4 +1749,15 @@ public final class Bukkit {
|
||||
public static Server.Spigot spigot() {
|
||||
return server.spigot();
|
||||
}
|
||||
@@ -29,10 +29,10 @@ index 780d603e4..33ccf2979 100644
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index a4cf71fb4..adfa27be9 100644
|
||||
index 1a05a438c..c8b50ec90 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1513,4 +1513,13 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1536,4 +1536,13 @@ public interface Server extends PluginMessageRecipient {
|
||||
@NotNull
|
||||
com.destroystokyo.paper.entity.ai.MobGoals getMobGoals();
|
||||
// Paper end
|
||||
@@ -1,7 +1,7 @@
|
||||
From 280f0a2c26874110fea70cc278976440c33f58e3 Mon Sep 17 00:00:00 2001
|
||||
From c9d8ecde06f4f694ed59d1da743b79b003a55b3c Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Fri, 31 May 2019 00:08:28 -0500
|
||||
Subject: [PATCH] Add ExecuteCommandEvent
|
||||
Subject: [PATCH] ExecuteCommandEvent
|
||||
|
||||
---
|
||||
.../purpur/event/ExecuteCommandEvent.java | 130 ++++++++++++++++++
|
||||
@@ -1,17 +1,17 @@
|
||||
From d74d33e1db952f3058834e45fc7ec553efa4d913 Mon Sep 17 00:00:00 2001
|
||||
From 6e3bdc06356d7b63bb206d7319badf594e30d872 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sun, 5 May 2019 12:58:19 -0500
|
||||
Subject: [PATCH] Implement LivingEntity safeFallDistance
|
||||
Subject: [PATCH] LivingEntity safeFallDistance
|
||||
|
||||
---
|
||||
.../java/org/bukkit/entity/LivingEntity.java | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 7f73e4b92..1192fef87 100644
|
||||
index a60523cc9..5b688cd04 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -732,4 +732,20 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -753,4 +753,20 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
*/
|
||||
void setJumping(boolean jumping);
|
||||
// Paper end
|
||||
@@ -1,7 +1,7 @@
|
||||
From 90c5505c1c2c90cc976c8eee480008146585fb72 Mon Sep 17 00:00:00 2001
|
||||
From 28381a87dfb15e899df91a30192d98eb2575dff8 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sat, 1 Feb 2020 22:22:07 -0600
|
||||
Subject: [PATCH] Add moon phase API
|
||||
Subject: [PATCH] MoonPhase API
|
||||
|
||||
---
|
||||
src/main/java/net/pl3x/purpur/MoonPhase.java | 36 ++++++++++++++++++++
|
||||
@@ -52,10 +52,10 @@ index 000000000..f5ad98c62
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 9518da825..cf0d18283 100644
|
||||
index 75c9225bd..9955d7417 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -3382,6 +3382,16 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
@@ -3450,6 +3450,16 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
@NotNull
|
||||
public List<Raid> getRaids();
|
||||
|
||||
@@ -1,128 +0,0 @@
|
||||
From 97b09e0112fecb7c4bd3dacf078e7cedcf402cdd Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Fri, 12 Jul 2019 02:09:58 -0500
|
||||
Subject: [PATCH] Implement ChunkTooLargeEvent
|
||||
|
||||
---
|
||||
.../pl3x/purpur/event/ChunkTooLargeEvent.java | 109 ++++++++++++++++++
|
||||
1 file changed, 109 insertions(+)
|
||||
create mode 100644 src/main/java/net/pl3x/purpur/event/ChunkTooLargeEvent.java
|
||||
|
||||
diff --git a/src/main/java/net/pl3x/purpur/event/ChunkTooLargeEvent.java b/src/main/java/net/pl3x/purpur/event/ChunkTooLargeEvent.java
|
||||
new file mode 100644
|
||||
index 000000000..f9d4a42c6
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/pl3x/purpur/event/ChunkTooLargeEvent.java
|
||||
@@ -0,0 +1,109 @@
|
||||
+package net.pl3x.purpur.event;
|
||||
+
|
||||
+import org.bukkit.Bukkit;
|
||||
+import org.bukkit.Location;
|
||||
+import org.bukkit.World;
|
||||
+import org.bukkit.event.Event;
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
+/**
|
||||
+ * Called when an oversized chunk loads or saves
|
||||
+ */
|
||||
+public class ChunkTooLargeEvent extends Event {
|
||||
+ private static final HandlerList handlers = new HandlerList();
|
||||
+ private final String worldName;
|
||||
+ private final World world;
|
||||
+ private final int chunkX;
|
||||
+ private final int chunkZ;
|
||||
+ private final boolean saving;
|
||||
+ private final boolean overzealous;
|
||||
+
|
||||
+ public ChunkTooLargeEvent(@NotNull String worldName, int chunkX, int chunkZ, boolean saving, boolean overzealous) {
|
||||
+ super(!Bukkit.isPrimaryThread());
|
||||
+ this.worldName = worldName;
|
||||
+ this.world = Bukkit.getWorld(worldName);
|
||||
+ this.chunkX = chunkX;
|
||||
+ this.chunkZ = chunkZ;
|
||||
+ this.saving = saving;
|
||||
+ this.overzealous = overzealous;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Get the world name according to the save directory
|
||||
+ *
|
||||
+ * @return World name
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public String getWorldName() {
|
||||
+ return worldName;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Get the world
|
||||
+ *
|
||||
+ * @return World, or null if world not loaded
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ public World getWorld() {
|
||||
+ return world;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Get the X chunk coordinate
|
||||
+ *
|
||||
+ * @return X chunk coordinate
|
||||
+ */
|
||||
+ public int getChunkX() {
|
||||
+ return chunkX;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Get the Z chunk coordinate
|
||||
+ *
|
||||
+ * @return Z chunk coordinate
|
||||
+ */
|
||||
+ public int getChunkZ() {
|
||||
+ return chunkZ;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Whether this happened during a save attempt.
|
||||
+ *
|
||||
+ * @return True if saving, false if loading
|
||||
+ */
|
||||
+ public boolean isSaving() {
|
||||
+ return saving;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * If saving, was this is overzealous mode
|
||||
+ *
|
||||
+ * @return True if saving in overzealous mode
|
||||
+ */
|
||||
+ public boolean isOverzealous() {
|
||||
+ return overzealous;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Get the location
|
||||
+ *
|
||||
+ * @return Location, or null if world not loaded
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ public Location getLocation() {
|
||||
+ return world == null ? null : new Location(world, chunkX << 4, 128, chunkZ << 4);
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From ca1fcc1af2f85b551bf7543deef46acea22634c4 Mon Sep 17 00:00:00 2001
|
||||
From cc7269c63a9bf44a2ddf6d3e51d3d665d265f271 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Tue, 23 Jul 2019 10:07:24 -0500
|
||||
Subject: [PATCH] Implement lagging threshold
|
||||
Subject: [PATCH] Lagging threshold
|
||||
|
||||
---
|
||||
src/main/java/org/bukkit/Bukkit.java | 9 +++++++++
|
||||
@@ -9,10 +9,10 @@ Subject: [PATCH] Implement lagging threshold
|
||||
2 files changed, 16 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 33ccf2979..ee8fe48aa 100644
|
||||
index 4f6f01939..4c410f6e1 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -1724,5 +1724,14 @@ public final class Bukkit {
|
||||
@@ -1759,5 +1759,14 @@ public final class Bukkit {
|
||||
public static String getServerName() {
|
||||
return server.getServerName();
|
||||
}
|
||||
@@ -28,10 +28,10 @@ index 33ccf2979..ee8fe48aa 100644
|
||||
// Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index adfa27be9..40bf67eb9 100644
|
||||
index c8b50ec90..dc6201365 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1521,5 +1521,12 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1544,5 +1544,12 @@ public interface Server extends PluginMessageRecipient {
|
||||
*/
|
||||
@NotNull
|
||||
String getServerName();
|
||||
@@ -1,7 +1,7 @@
|
||||
From 6736fb9a85fe44f9af5c97709ed00d248ae45d0d Mon Sep 17 00:00:00 2001
|
||||
From 3414a3777cd50ba9f807ed0f83284f7dd88e0137 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Fri, 5 Jul 2019 16:37:04 -0500
|
||||
Subject: [PATCH] Implement ItemFactory#getMonsterEgg
|
||||
Subject: [PATCH] ItemFactory#getMonsterEgg
|
||||
|
||||
---
|
||||
src/main/java/org/bukkit/inventory/ItemFactory.java | 11 +++++++++++
|
||||
@@ -1,7 +1,7 @@
|
||||
From ace36924c5ca7ff1d4ca22ede17a8fd5ba98c21d Mon Sep 17 00:00:00 2001
|
||||
From 793caade58c03633ae3b36b59ced116586950df6 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Fri, 5 Jul 2019 18:21:15 -0500
|
||||
Subject: [PATCH] Implement PlayerSetSpawnerTypeWithEggEvent
|
||||
Subject: [PATCH] PlayerSetSpawnerTypeWithEggEvent
|
||||
|
||||
---
|
||||
.../PlayerSetSpawnerTypeWithEggEvent.java | 85 +++++++++++++++++++
|
||||
@@ -1,7 +1,7 @@
|
||||
From 58a00947d50d1e9be98cac3ed1d51ced2d3bfd79 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 19 Oct 2019 03:20:49 -0500
|
||||
Subject: [PATCH] Add MonsterEggSpawnEvent
|
||||
From 6f446935210fd7f4676937654457d8d6c1faf2ca Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 21 Nov 2016 17:02:11 -0500
|
||||
Subject: [PATCH] EMC - MonsterEggSpawnEvent
|
||||
|
||||
---
|
||||
.../event/entity/MonsterEggSpawnEvent.java | 67 +++++++++++++++++++
|
||||
@@ -1,7 +1,7 @@
|
||||
From 9ee7302f78720dc515a2bdcca1d53512de2ac975 Mon Sep 17 00:00:00 2001
|
||||
From 49323476e3d0ca119769a379c1080de43ebd3981 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Mon, 7 Oct 2019 00:15:28 -0500
|
||||
Subject: [PATCH] Add API for Villager#resetOffers()
|
||||
Subject: [PATCH] Villager#resetOffers
|
||||
|
||||
---
|
||||
src/main/java/org/bukkit/entity/Villager.java | 7 +++++++
|
||||
@@ -1,17 +1,17 @@
|
||||
From 3474b0cb95240f60a13d4c4fc4d7d2ecdcf95620 Mon Sep 17 00:00:00 2001
|
||||
From f7b6857340ba29d5877523fa69ad968247143ae7 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 19 Oct 2019 00:34:36 -0500
|
||||
Subject: [PATCH] Add getPlacementBlockData to World
|
||||
Subject: [PATCH] World#getPlacementBlockData
|
||||
|
||||
---
|
||||
src/main/java/org/bukkit/World.java | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index cf0d18283..3a7226cc9 100644
|
||||
index 9955d7417..950425979 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -3390,6 +3390,16 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
@@ -3458,6 +3458,16 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
*/
|
||||
@NotNull
|
||||
net.pl3x.purpur.MoonPhase getMoonPhase();
|
||||
@@ -1,132 +0,0 @@
|
||||
From 46a1c768adda232530d684c5ac49b69b6271cd04 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 19 Oct 2019 03:27:55 -0500
|
||||
Subject: [PATCH] Add ThrownEggHatchEvent
|
||||
|
||||
---
|
||||
.../event/entity/ThrownEggHatchEvent.java | 113 ++++++++++++++++++
|
||||
1 file changed, 113 insertions(+)
|
||||
create mode 100644 src/main/java/net/pl3x/purpur/event/entity/ThrownEggHatchEvent.java
|
||||
|
||||
diff --git a/src/main/java/net/pl3x/purpur/event/entity/ThrownEggHatchEvent.java b/src/main/java/net/pl3x/purpur/event/entity/ThrownEggHatchEvent.java
|
||||
new file mode 100644
|
||||
index 000000000..815e871d0
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/pl3x/purpur/event/entity/ThrownEggHatchEvent.java
|
||||
@@ -0,0 +1,113 @@
|
||||
+package net.pl3x.purpur.event.entity;
|
||||
+
|
||||
+import org.bukkit.entity.Egg;
|
||||
+import org.bukkit.entity.EntityType;
|
||||
+import org.bukkit.event.Event;
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+
|
||||
+/**
|
||||
+ * Called when a thrown egg might hatch
|
||||
+ */
|
||||
+public class ThrownEggHatchEvent extends Event {
|
||||
+ private static final HandlerList handlers = new HandlerList();
|
||||
+
|
||||
+ private final Egg egg;
|
||||
+ private boolean hatching;
|
||||
+ private EntityType hatchType;
|
||||
+ private byte numHatches;
|
||||
+
|
||||
+ public ThrownEggHatchEvent(@NotNull final Egg egg, final boolean hatching, final byte numHatches, @NotNull final EntityType hatchingType) {
|
||||
+ this.egg = egg;
|
||||
+ this.hatching = hatching;
|
||||
+ this.numHatches = numHatches;
|
||||
+ this.hatchType = hatchingType;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the egg involved in this event.
|
||||
+ *
|
||||
+ * @return the egg involved in this event
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public Egg getEgg() {
|
||||
+ return egg;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets whether the egg is hatching or not. Will be what the server
|
||||
+ * would've done without interaction.
|
||||
+ *
|
||||
+ * @return boolean Whether the egg is going to hatch or not
|
||||
+ */
|
||||
+ public boolean isHatching() {
|
||||
+ return hatching;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Sets whether the egg will hatch or not.
|
||||
+ *
|
||||
+ * @param hatching true if you want the egg to hatch, false if you want it not to
|
||||
+ */
|
||||
+ public void setHatching(boolean hatching) {
|
||||
+ this.hatching = hatching;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Get the type of the mob being hatched (EntityType.CHICKEN by default)
|
||||
+ *
|
||||
+ * @return The type of the mob being hatched by the egg
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public EntityType getHatchingType() {
|
||||
+ return hatchType;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Change the type of mob being hatched by the egg
|
||||
+ *
|
||||
+ * @param hatchType The type of the mob being hatched by the egg
|
||||
+ */
|
||||
+ public void setHatchingType(@NotNull EntityType hatchType) {
|
||||
+ if (!hatchType.isSpawnable()) throw new IllegalArgumentException("Can't spawn that entity type from an egg!");
|
||||
+ this.hatchType = hatchType;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Get the number of mob hatches from the egg. By default the number will
|
||||
+ * be the number the server would've done
|
||||
+ * <ul>
|
||||
+ * <li>7/8 chance of being 0
|
||||
+ * <li>31/256 ~= 1/8 chance to be 1
|
||||
+ * <li>1/256 chance to be 4
|
||||
+ * </ul>
|
||||
+ *
|
||||
+ * @return The number of mobs going to be hatched by the egg
|
||||
+ */
|
||||
+ public byte getNumHatches() {
|
||||
+ return numHatches;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Change the number of mobs coming out of the hatched egg
|
||||
+ * <p>
|
||||
+ * The boolean hatching will override this number. Ie. If hatching =
|
||||
+ * false, this number will not matter
|
||||
+ *
|
||||
+ * @param numHatches The number of mobs coming out of the egg
|
||||
+ */
|
||||
+ public void setNumHatches(byte numHatches) {
|
||||
+ this.numHatches = numHatches;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
From 6172f928c68e5721317cacb90c6d32e5c45239f4 Mon Sep 17 00:00:00 2001
|
||||
From ee3249840f9b53b10d7df7434088c5be3a1cd1ea Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 19 Oct 2019 02:25:05 -0500
|
||||
Subject: [PATCH] Add playPickupItemAnimation to LivingEntity
|
||||
Subject: [PATCH] LivingEntity#playPickupItemAnimation
|
||||
|
||||
---
|
||||
.../java/org/bukkit/entity/LivingEntity.java | 17 +++++++++++++++++
|
||||
1 file changed, 17 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 1192fef87..2a713adb5 100644
|
||||
index 5b688cd04..a0db76946 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -747,5 +747,22 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -768,5 +768,22 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
* @param safeFallDistance Safe fall distance
|
||||
*/
|
||||
void setSafeFallDistance(float safeFallDistance);
|
||||
@@ -1,7 +1,7 @@
|
||||
From 1f20a2388d7c234a15f667c52eb11e1e2e89153e Mon Sep 17 00:00:00 2001
|
||||
From 9dc21420ed45e161850891442fb6f6ab988eb2e8 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 19 Oct 2019 02:35:24 -0500
|
||||
Subject: [PATCH] Add getPlayer to SkeletonHorseTrapEvent
|
||||
Subject: [PATCH] SkeletonHorseTrapEvent#getPlayer
|
||||
|
||||
---
|
||||
.../event/entity/SkeletonHorseTrapEvent.java | 24 +++++++++++++++++++
|
||||
@@ -1,7 +1,7 @@
|
||||
From b5e2f3328828a98fa1521fe61725cddd2d104590 Mon Sep 17 00:00:00 2001
|
||||
From 585d46d0b381d2dd334997acf9140f505b484bfe Mon Sep 17 00:00:00 2001
|
||||
From: KennyTV <kennytv@t-online.de>
|
||||
Date: Mon, 20 Apr 2020 13:57:13 +0200
|
||||
Subject: [PATCH] PlayerItemCooldownEvent
|
||||
Subject: [PATCH] PaperPR - PlayerItemCooldownEvent
|
||||
|
||||
---
|
||||
.../event/player/PlayerItemCooldownEvent.java | 77 +++++++++++++++++++
|
||||
@@ -1,7 +1,7 @@
|
||||
From ed866cae2228a4924e2ddba5b9f0377170d9555f Mon Sep 17 00:00:00 2001
|
||||
From e15332baaee66fbb5134bc7891a9ba0890d24e04 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Tue, 11 Feb 2020 21:56:38 -0600
|
||||
Subject: [PATCH] Implement EntityMoveEvent
|
||||
Subject: [PATCH] EntityMoveEvent
|
||||
|
||||
---
|
||||
.../purpur/event/entity/EntityMoveEvent.java | 95 +++++++++++++++++++
|
||||
@@ -1,21 +1,21 @@
|
||||
From 5b7ad2395e52a542256545223baee7b6f57e0adf Mon Sep 17 00:00:00 2001
|
||||
From b9e5c3e951fb47294a74c6515e6c3f5442a8b8e7 Mon Sep 17 00:00:00 2001
|
||||
From: Eearslya Sleiarion <eearslya@gmail.com>
|
||||
Date: Mon, 24 Jun 2019 21:27:39 -0700
|
||||
Subject: [PATCH] Add BellRingEvent
|
||||
Subject: [PATCH] PaperPR - BellRingEvent
|
||||
|
||||
Add a new event, BellRingEvent, to trigger whenever a player rings a
|
||||
village bell. Passes along the bell block and the player who rang it.
|
||||
---
|
||||
.../paper/event/block/BellRingEvent.java | 54 +++++++++++++++++++
|
||||
1 file changed, 54 insertions(+)
|
||||
.../paper/event/block/BellRingEvent.java | 53 +++++++++++++++++++
|
||||
1 file changed, 53 insertions(+)
|
||||
create mode 100644 src/main/java/com/destroystokyo/paper/event/block/BellRingEvent.java
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/block/BellRingEvent.java b/src/main/java/com/destroystokyo/paper/event/block/BellRingEvent.java
|
||||
new file mode 100644
|
||||
index 000000000..7b4de3f0a
|
||||
index 000000000..82e0a747b
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/block/BellRingEvent.java
|
||||
@@ -0,0 +1,54 @@
|
||||
@@ -0,0 +1,53 @@
|
||||
+package com.destroystokyo.paper.event.block;
|
||||
+
|
||||
+import org.bukkit.block.Block;
|
||||
@@ -23,7 +23,6 @@ index 000000000..7b4de3f0a
|
||||
+import org.bukkit.event.Cancellable;
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.bukkit.event.block.BlockEvent;
|
||||
+import org.bukkit.potion.PotionEffect;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+
|
||||
+/**
|
||||
@@ -1,4 +1,4 @@
|
||||
From 02ff3b3a31c89fa3c48f228b8637803d919d0c9c Mon Sep 17 00:00:00 2001
|
||||
From be009f6bd10975040ad8ff9378eca1569132774b Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sat, 2 May 2020 20:55:31 -0500
|
||||
Subject: [PATCH] Player invulnerabilities
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH] Player invulnerabilities
|
||||
1 file changed, 21 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index edc481170..5d77b71d1 100644
|
||||
index 2dca16ac4..55edcd54b 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -1850,5 +1850,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1890,5 +1890,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* Reset the idle timer back to 0
|
||||
*/
|
||||
void resetIdleTimer();
|
||||
@@ -1,7 +1,7 @@
|
||||
From 3121b0887bf03835c9b9a6f1fd3fd2775af5681f Mon Sep 17 00:00:00 2001
|
||||
From 4b4840812bcfe1331263157f9b7b61ec8d79e672 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sun, 19 Apr 2020 00:25:09 -0500
|
||||
Subject: [PATCH] More anvil controls
|
||||
Subject: [PATCH] Anvil API
|
||||
|
||||
---
|
||||
.../event/inventory/AnvilTakeResultEvent.java | 52 +++++++++++++++++++
|
||||
@@ -1,7 +1,7 @@
|
||||
From 28d6279d8881deed20cc24abfecddfcffefb94c2 Mon Sep 17 00:00:00 2001
|
||||
From dc446f6d6e36a6b06f04d8395835257126454d27 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sun, 15 Mar 2020 20:52:12 -0500
|
||||
Subject: [PATCH] Add ItemStack convenience methods
|
||||
Subject: [PATCH] ItemStack convenience methods
|
||||
|
||||
---
|
||||
src/main/java/org/bukkit/Material.java | 32 +
|
||||
@@ -9,10 +9,10 @@ Subject: [PATCH] Add ItemStack convenience methods
|
||||
2 files changed, 651 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index b89fc2dc0..d5cf01dae 100644
|
||||
index 769c65e79..7126e5cba 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -8021,4 +8021,36 @@ public enum Material implements Keyed {
|
||||
@@ -8636,4 +8636,36 @@ public enum Material implements Keyed {
|
||||
// </editor-fold>
|
||||
}
|
||||
}
|
||||
@@ -50,7 +50,7 @@ index b89fc2dc0..d5cf01dae 100644
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index a8ade268c..cdc62301e 100644
|
||||
index ccd81fca2..c38fd8403 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -17,6 +17,18 @@ import org.bukkit.inventory.meta.ItemMeta;
|
||||
@@ -72,7 +72,7 @@ index a8ade268c..cdc62301e 100644
|
||||
|
||||
/**
|
||||
* Represents a stack of items.
|
||||
@@ -783,4 +795,611 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
|
||||
@@ -791,4 +803,611 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
|
||||
return itemMeta.hasItemFlag(flag);
|
||||
}
|
||||
// Paper end
|
||||
@@ -1,61 +0,0 @@
|
||||
From f6f1059eb70c8286fafd421d629652abddeab72a Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 19 Oct 2019 02:43:10 -0500
|
||||
Subject: [PATCH] Add LootableInventoryFirstFillEvent
|
||||
|
||||
---
|
||||
.../LootableInventoryFirstFillEvent.java | 42 +++++++++++++++++++
|
||||
1 file changed, 42 insertions(+)
|
||||
create mode 100644 src/main/java/net/pl3x/purpur/event/block/LootableInventoryFirstFillEvent.java
|
||||
|
||||
diff --git a/src/main/java/net/pl3x/purpur/event/block/LootableInventoryFirstFillEvent.java b/src/main/java/net/pl3x/purpur/event/block/LootableInventoryFirstFillEvent.java
|
||||
new file mode 100644
|
||||
index 000000000..ef8eafb7c
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/pl3x/purpur/event/block/LootableInventoryFirstFillEvent.java
|
||||
@@ -0,0 +1,42 @@
|
||||
+package net.pl3x.purpur.event.block;
|
||||
+
|
||||
+import com.destroystokyo.paper.loottable.LootableInventory;
|
||||
+import org.bukkit.entity.Player;
|
||||
+import org.bukkit.event.Event;
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
+public class LootableInventoryFirstFillEvent extends Event {
|
||||
+ @Nullable
|
||||
+ private final Player player;
|
||||
+ @NotNull
|
||||
+ private final LootableInventory inventory;
|
||||
+
|
||||
+ public LootableInventoryFirstFillEvent(@Nullable Player player, @NotNull LootableInventory inventory) {
|
||||
+ this.player = player;
|
||||
+ this.inventory = inventory;
|
||||
+ }
|
||||
+
|
||||
+ @Nullable
|
||||
+ public Player getPlayer() {
|
||||
+ return player;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public LootableInventory getInventory() {
|
||||
+ return inventory;
|
||||
+ }
|
||||
+
|
||||
+ private static final HandlerList handlers = new HandlerList();
|
||||
+
|
||||
+ @NotNull
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
From 19065eff8026e396d1bf06bc2f87e7598c322c25 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sun, 28 Jun 2020 21:50:55 -0500
|
||||
Subject: [PATCH] Phantoms attracted to crystals and crystals shoot phantoms
|
||||
|
||||
---
|
||||
.../java/com/destroystokyo/paper/entity/ai/VanillaGoal.java | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
|
||||
index d7f1b2c84..8d25b6f09 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
|
||||
@@ -205,4 +205,8 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
|
||||
GoalKey<Zombie> ZOMBIE_ATTACK = GoalKey.of(Zombie.class, NamespacedKey.minecraft("zombie_attack"));
|
||||
GoalKey<Creature> STROLL_VILLAGE_GOLEM = GoalKey.of(Creature.class, NamespacedKey.minecraft("stroll_village_golem"));
|
||||
GoalKey<Mob> UNIVERSAL_ANGER_RESET = GoalKey.of(Mob.class, NamespacedKey.minecraft("universal_anger_reset"));
|
||||
+ // Purpur start
|
||||
+ GoalKey<Phantom> FIND_CRYSTAL_GOAL = GoalKey.of(Phantom.class, NamespacedKey.minecraft("find_crystal_goal"));
|
||||
+ GoalKey<Phantom> ORBIT_CRYSTAL_GOAL = GoalKey.of(Phantom.class, NamespacedKey.minecraft("orbit_crystal_goal"));
|
||||
+ // Purpur end
|
||||
}
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
From b08452c2c1e0893a931b924f80972baa4d007619 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 19 Oct 2019 03:53:46 -0500
|
||||
Subject: [PATCH] Add back EntityCreatePortalEvent for EnderDragon
|
||||
|
||||
---
|
||||
src/main/java/org/bukkit/PortalType.java | 7 +++++++
|
||||
.../org/bukkit/event/entity/EntityCreatePortalEvent.java | 4 +---
|
||||
2 files changed, 8 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/PortalType.java b/src/main/java/org/bukkit/PortalType.java
|
||||
index 427cfbb8b..e23565323 100644
|
||||
--- a/src/main/java/org/bukkit/PortalType.java
|
||||
+++ b/src/main/java/org/bukkit/PortalType.java
|
||||
@@ -15,6 +15,13 @@ public enum PortalType {
|
||||
*/
|
||||
ENDER,
|
||||
|
||||
+ // Purpur start
|
||||
+ /**
|
||||
+ * This is an End Gateway portal
|
||||
+ */
|
||||
+ END_GATEWAY,
|
||||
+ // Purpur end
|
||||
+
|
||||
/**
|
||||
* This is a custom Plugin portal.
|
||||
*/
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/EntityCreatePortalEvent.java b/src/main/java/org/bukkit/event/entity/EntityCreatePortalEvent.java
|
||||
index 397baaefd..7456240b4 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/EntityCreatePortalEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/EntityCreatePortalEvent.java
|
||||
@@ -11,10 +11,8 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Thrown when a Living Entity creates a portal in a world.
|
||||
- *
|
||||
- * @deprecated Use {@link PortalCreateEvent}
|
||||
*/
|
||||
-@Deprecated
|
||||
+// Purpur - un-deprecate
|
||||
public class EntityCreatePortalEvent extends EntityEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final List<BlockState> blocks;
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
From eb6271ac09f62253e19664c2a5e4b28f1dd5a914 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Wed, 1 Apr 2020 19:18:29 -0500
|
||||
Subject: [PATCH] Configurable enchantment max level
|
||||
|
||||
---
|
||||
src/main/java/org/bukkit/enchantments/Enchantment.java | 9 +++++++++
|
||||
.../java/org/bukkit/enchantments/EnchantmentWrapper.java | 7 +++++++
|
||||
2 files changed, 16 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
index d1885f178..b277428d6 100644
|
||||
--- a/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
+++ b/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
@@ -232,6 +232,15 @@ public abstract class Enchantment implements Keyed {
|
||||
*/
|
||||
public abstract int getMaxLevel();
|
||||
|
||||
+ // Purpur start
|
||||
+ /**
|
||||
+ * Sets the maximum level that this Enchantment may become.
|
||||
+ *
|
||||
+ * @param maxLevel Maximum level of the Enchantment
|
||||
+ */
|
||||
+ public abstract void setMaxLevel(int maxLevel);
|
||||
+ // Purpur end
|
||||
+
|
||||
/**
|
||||
* Gets the level that this Enchantment should start at
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/enchantments/EnchantmentWrapper.java b/src/main/java/org/bukkit/enchantments/EnchantmentWrapper.java
|
||||
index 9566e4306..67e31fee3 100644
|
||||
--- a/src/main/java/org/bukkit/enchantments/EnchantmentWrapper.java
|
||||
+++ b/src/main/java/org/bukkit/enchantments/EnchantmentWrapper.java
|
||||
@@ -27,6 +27,13 @@ public class EnchantmentWrapper extends Enchantment {
|
||||
return getEnchantment().getMaxLevel();
|
||||
}
|
||||
|
||||
+ // Purpur start
|
||||
+ @Override
|
||||
+ public void setMaxLevel(int maxLevel) {
|
||||
+ getEnchantment().setMaxLevel(maxLevel);
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
@Override
|
||||
public int getStartLevel() {
|
||||
return getEnchantment().getStartLevel();
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
From 520632fdade49977988e20c07bd90d360f86418a Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Thu, 18 Jun 2020 23:29:43 -0500
|
||||
Subject: [PATCH] Add PrepareGrindstoneEvent
|
||||
|
||||
---
|
||||
.../inventory/PrepareGrindstoneEvent.java | 54 +++++++++++++++++++
|
||||
1 file changed, 54 insertions(+)
|
||||
create mode 100644 src/main/java/net/pl3x/purpur/event/inventory/PrepareGrindstoneEvent.java
|
||||
|
||||
diff --git a/src/main/java/net/pl3x/purpur/event/inventory/PrepareGrindstoneEvent.java b/src/main/java/net/pl3x/purpur/event/inventory/PrepareGrindstoneEvent.java
|
||||
new file mode 100644
|
||||
index 000000000..d0670bb72
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/pl3x/purpur/event/inventory/PrepareGrindstoneEvent.java
|
||||
@@ -0,0 +1,54 @@
|
||||
+package net.pl3x.purpur.event.inventory;
|
||||
+
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.bukkit.event.inventory.InventoryEvent;
|
||||
+import org.bukkit.inventory.GrindstoneInventory;
|
||||
+import org.bukkit.inventory.InventoryView;
|
||||
+import org.bukkit.inventory.ItemStack;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
+/**
|
||||
+ * Called when an item is put in a grindstone slot.
|
||||
+ */
|
||||
+public class PrepareGrindstoneEvent extends InventoryEvent {
|
||||
+
|
||||
+ private static final HandlerList handlers = new HandlerList();
|
||||
+ private ItemStack result;
|
||||
+
|
||||
+ public PrepareGrindstoneEvent(@NotNull InventoryView inventory, @Nullable ItemStack result) {
|
||||
+ super(inventory);
|
||||
+ this.result = result;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public GrindstoneInventory getInventory() {
|
||||
+ return (GrindstoneInventory) super.getInventory();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Get result item, may be null.
|
||||
+ *
|
||||
+ * @return result item
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ public ItemStack getResult() {
|
||||
+ return result;
|
||||
+ }
|
||||
+
|
||||
+ public void setResult(@Nullable ItemStack result) {
|
||||
+ this.result = result;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
2.26.2
|
||||
|
||||
Reference in New Issue
Block a user