9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-19 14:59:25 +00:00

cleanup patches for rework

This commit is contained in:
NONPLAYT
2025-02-21 22:26:06 +03:00
parent 33526c57ec
commit b90c03f48d
98 changed files with 0 additions and 6588 deletions

View File

@@ -1,77 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
Date: Tue, 14 Jan 2025 19:49:49 +0300
Subject: [PATCH] Expanded Adventure support
Adds support for Adventure in a few places where it was previously missing.
Original patch was taken from Parchment: https://github.com/ProjectEdenGG/Parchment
diff --git a/src/main/java/org/bukkit/Color.java b/src/main/java/org/bukkit/Color.java
index f8edb964c4af597b03a2de06c464cc06a96b791c..596e2e09c6a64fa5861221789185d2fd7b004248 100644
--- a/src/main/java/org/bukkit/Color.java
+++ b/src/main/java/org/bukkit/Color.java
@@ -17,7 +17,7 @@ import org.jetbrains.annotations.Nullable;
* but subject to change.
*/
@SerializableAs("Color")
-public final class Color implements ConfigurationSerializable {
+public final class Color implements ConfigurationSerializable, net.kyori.adventure.text.format.TextColor { // DivineMC - Expanded Adventure support
private static final int BIT_MASK = 0xff;
private static final int DEFAULT_ALPHA = 255;
@@ -310,6 +310,13 @@ public final class Color implements ConfigurationSerializable {
return getAlpha() << 24 | getRed() << 16 | getGreen() << 8 | getBlue();
}
+ // DivineMC start - Expanded Adventure support
+ @Override
+ public int value() {
+ return asRGB();
+ }
+ // DivineMC end - Expanded Adventure support
+
/**
* Gets the color as an BGR integer.
*
diff --git a/src/main/java/org/bukkit/DyeColor.java b/src/main/java/org/bukkit/DyeColor.java
index 2f038f233afd4210687586800070d5f61e40562a..24068f23f45a0d3b837b04565d143a5cd8cd8869 100644
--- a/src/main/java/org/bukkit/DyeColor.java
+++ b/src/main/java/org/bukkit/DyeColor.java
@@ -8,7 +8,7 @@ import org.jetbrains.annotations.Nullable;
/**
* All supported color values for dyes and cloth
*/
-public enum DyeColor {
+public enum DyeColor implements net.kyori.adventure.util.RGBLike, net.kyori.adventure.text.format.StyleBuilderApplicable { // DivineMC - Expanded Adventure support
/**
* Represents white dye.
@@ -135,6 +135,28 @@ public enum DyeColor {
return firework;
}
+ // DivineMC start - Expanded Adventure support
+ @Override
+ public @org.jetbrains.annotations.Range(from = 0L, to = 255L) int red() {
+ return color.getRed();
+ }
+
+ @Override
+ public @org.jetbrains.annotations.Range(from = 0L, to = 255L) int green() {
+ return color.getGreen();
+ }
+
+ @Override
+ public @org.jetbrains.annotations.Range(from = 0L, to = 255L) int blue() {
+ return color.getBlue();
+ }
+
+ @Override
+ public void styleApply(net.kyori.adventure.text.format.Style.@org.jetbrains.annotations.NotNull Builder style) {
+ style.color(net.kyori.adventure.text.format.TextColor.color(color));
+ }
+ // DivineMC end - Expanded Adventure support
+
/**
* Gets the DyeColor with the given wool data value.
*

View File

@@ -1,181 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
Date: Tue, 14 Jan 2025 20:36:30 +0300
Subject: [PATCH] Extend Location API
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
index 20e30fa5a33c68a4dec12e51a6b81f4afbda35b5..8b71277d3cab283eeab43df3e4dc4fb4fbad2388 100644
--- a/src/main/java/org/bukkit/Location.java
+++ b/src/main/java/org/bukkit/Location.java
@@ -1253,4 +1253,170 @@ public class Location implements Cloneable, ConfigurationSerializable, io.paperm
public @NotNull Location toLocation(@NotNull World world) {
return new Location(world, this.x(), this.y(), this.z(), this.getYaw(), this.getPitch());
}
+
+ // DivineMC start - Extend Location API
+ /**
+ * Sets the x-coordinate of this location.
+ *
+ * @param x The x-coordinate
+ * @return this location
+ */
+ public @NotNull Location x(double x) {
+ this.x = x;
+ return this;
+ }
+
+ /**
+ * Sets the y-coordinate of this location.
+ *
+ * @param y The y-coordinate
+ * @return this location
+ */
+ public @NotNull Location y(double y) {
+ this.y = y;
+ return this;
+ }
+
+ /**
+ * Sets the z-coordinate of this location.
+ *
+ * @param z The z-coordinate
+ * @return this location
+ */
+ public @NotNull Location z(double z) {
+ this.z = z;
+ return this;
+ }
+
+ /**
+ * Sets the yaw of this location, measured in degrees.
+ * <ul>
+ * <li>A yaw of 0 or 360 represents the positive z direction.
+ * <li>A yaw of 180 represents the negative z direction.
+ * <li>A yaw of 90 represents the negative x direction.
+ * <li>A yaw of 270 represents the positive x direction.
+ * </ul>
+ * Increasing yaw values are the equivalent of turning to your
+ * right-facing, increasing the scale of the next respective axis, and
+ * decreasing the scale of the previous axis.
+ *
+ * @param yaw new rotation's yaw
+ * @return this location
+ */
+ public @NotNull Location yaw(float yaw) {
+ this.yaw = yaw;
+ return this;
+ }
+
+ /**
+ * Sets the pitch of this location, measured in degrees.
+ * <ul>
+ * <li>A pitch of 0 represents level forward facing.
+ * <li>A pitch of 90 represents downward facing, or negative y
+ * direction.
+ * <li>A pitch of -90 represents upward facing, or positive y direction.
+ * </ul>
+ * Increasing pitch values the equivalent of looking down.
+ *
+ * @param pitch new incline's pitch
+ * @return this location
+ */
+ public @NotNull Location pitch(float pitch) {
+ this.pitch = pitch;
+ return this;
+ }
+
+ /**
+ * Sets the world that this location resides in
+ *
+ * @param world New world that this location resides in
+ * @return this location
+ */
+ public @NotNull Location world(@Nullable World world) {
+ this.world = (world == null) ? null : new WeakReference<>(world);
+ return this;
+ }
+
+ /**
+ * Increments the x-coordinate by the given value.
+ *
+ * @param x Amount to increment the x-coordinate by
+ * @return this location
+ */
+ public @NotNull Location addX(double x) {
+ this.x += x;
+ return this;
+ }
+
+ /**
+ * Increments the y-coordinate by the given value.
+ *
+ * @param y Amount to increment the y-coordinate by
+ * @return this location
+ */
+ public @NotNull Location addY(double y) {
+ this.y += y;
+ return this;
+ }
+
+ /**
+ * Increments the z-coordinate by the given value.
+ *
+ * @param z Amount to increment the z-coordinate by
+ * @return this location
+ */
+ public @NotNull Location addZ(double z) {
+ this.z += z;
+ return this;
+ }
+
+ /**
+ * Returns location with centered X, Y and Z values.
+ *
+ * @return this location
+ */
+ public @NotNull Location center() {
+ return center(0.5);
+ }
+
+ /**
+ * Returns location with centered X and Z values.
+ * Y will be set to provided.
+ *
+ * @param y Y adding value
+ * @return this location
+ */
+ public @NotNull Location center(double y) {
+ return set(getBlockX() + 0.5, getBlockY() + y, getBlockZ() + 0.5);
+ }
+
+ /**
+ * Checks if locations have the same X, Y and Z values.
+ *
+ * @param loc Location to check
+ * @return true if locations have same coordinates
+ * @apiNote Ignores world
+ */
+ public boolean isSame(@NotNull Location loc) {
+ return getY() == loc.getY() && getX() == loc.getX() && getZ() == loc.getZ();
+ }
+
+ /**
+ * Shifts this location by one block up
+ *
+ * @return this location
+ */
+ public @NotNull Location above() {
+ return addY(1);
+ }
+
+ /**
+ * Shifts this location by one block down
+ *
+ * @return this location
+ */
+ public @NotNull Location below() {
+ return addY(-1);
+ }
+ // DivineMC end - Extend Location API
}

View File

@@ -1,80 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
Date: Tue, 14 Jan 2025 20:42:04 +0300
Subject: [PATCH] Extend Sound API
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
index b703ad820ff873097dadff9e55b53fcc6b1b8698..b35c3852a3b8e62c7d2f67fc3ff651c8e0a4d5f2 100644
--- a/src/main/java/org/bukkit/block/Block.java
+++ b/src/main/java/org/bukkit/block/Block.java
@@ -817,4 +817,29 @@ public interface Block extends Metadatable, Translatable, net.kyori.adventure.tr
return this.getBlockData().getDestroySpeed(itemStack, considerEnchants);
}
// Paper end - destroy speed API
+
+ // DivineMC start - Extend Sound API
+ /**
+ * Plays a sound at the location of the block
+ *
+ * @param sound sound to play
+ * @param volume volume of the sound
+ * @param pitch pitch of the sound
+ */
+ default void emitSound(@NotNull org.bukkit.Sound sound, float volume, float pitch) {
+ emitSound(sound, org.bukkit.SoundCategory.BLOCKS, volume, pitch);
+ }
+
+ /**
+ * Plays a sound at the location of the block
+ *
+ * @param sound sound to play
+ * @param category category of the sound
+ * @param volume volume of the sound
+ * @param pitch pitch of the sound
+ */
+ default void emitSound(@NotNull org.bukkit.Sound sound, @NotNull org.bukkit.SoundCategory category, float volume, float pitch) {
+ getWorld().playSound(getLocation().toCenterLocation(), sound, category, volume, pitch);
+ }
+ // DivineMC end - Extend Sound API
}
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
index 49d3ca54a761e08cfe1bc770cb879223bf0e21e8..942f7497a56baa8e717980795e605a8907039fe6 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -1251,4 +1251,35 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
*/
void setImmuneToFire(@Nullable Boolean fireImmune);
// Purpur end - Fire Immunity API
+
+ // DivineMC start - Extend Sound API
+ /**
+ * Plays a sound at the location of the entity
+ *
+ * @param sound sound to play
+ * @param volume volume of the sound
+ * @param pitch pitch of the sound
+ */
+ default void emitSound(@NotNull org.bukkit.Sound sound, float volume, float pitch) {
+ org.bukkit.SoundCategory soundGroup = switch (this) {
+ case HumanEntity humanEntity -> org.bukkit.SoundCategory.PLAYERS;
+ case Ambient ambient -> org.bukkit.SoundCategory.AMBIENT;
+ case Monster monster -> org.bukkit.SoundCategory.HOSTILE;
+ default -> org.bukkit.SoundCategory.NEUTRAL;
+ };
+ emitSound(sound, soundGroup, volume, pitch);
+ }
+
+ /**
+ * Plays a sound at the location of the block
+ *
+ * @param sound sound to play
+ * @param category category of the sound
+ * @param volume volume of the sound
+ * @param pitch pitch of the sound
+ */
+ default void emitSound(@NotNull org.bukkit.Sound sound, @NotNull org.bukkit.SoundCategory category, float volume, float pitch) {
+ getWorld().playSound(this, sound, category, volume, pitch);
+ }
+ // DivineMC end - Extend Sound API
}

View File

@@ -1,17 +0,0 @@
--- a/src/main/java/io/papermc/paper/ServerBuildInfo.java
+++ b/src/main/java/io/papermc/paper/ServerBuildInfo.java
@@ -25,6 +_,14 @@
*/
Key BRAND_PURPUR_ID = Key.key("purpurmc", "purpur");
// Purpur end
+
+ // DivineMC start
+ /**
+ * The brand id for DivineMC.
+ */
+ Key BRAND_DIVINEMC_ID = Key.key("bxteam", "divinemc");
+ // DivineMC end
+
/**
* Gets the {@code ServerBuildInfo}.
*

View File

@@ -1,73 +0,0 @@
--- a/src/main/java/org/bukkit/Note.java
+++ b/src/main/java/org/bukkit/Note.java
@@ -127,6 +_,7 @@
}
private final byte note;
+ private final net.kyori.adventure.text.format.TextColor color; // DivineMC - Note Color API
/**
* Creates a new note.
@@ -138,6 +_,7 @@
Preconditions.checkArgument(note >= 0 && note <= 24, "The note value has to be between 0 and 24.");
this.note = (byte) note;
+ this.color = getColor(note); // DivineMC - Note Color API
}
/**
@@ -158,6 +_,7 @@
}
this.note = (byte) (octave * Tone.TONES_COUNT + tone.getId(sharped));
+ this.color = getColor(note); // DivineMC - Note Color API
}
/**
@@ -298,4 +_,46 @@
public String toString() {
return "Note{" + getTone().toString() + (isSharped() ? "#" : "") + "}";
}
+
+ // DivineMC start - Note Color API
+ /**
+ * Get color of the played note.
+ *
+ * @return the color of the note
+ */
+ @NotNull
+ public net.kyori.adventure.text.format.TextColor getColor() {
+ return color;
+ }
+
+ private static @NotNull net.kyori.adventure.text.format.TextColor getColor(int note) {
+ return switch (note) {
+ case 0 -> net.kyori.adventure.text.format.TextColor.fromHexString("#77D700");
+ case 1 -> net.kyori.adventure.text.format.TextColor.fromHexString("#95C000");
+ case 2 -> net.kyori.adventure.text.format.TextColor.fromHexString("#B2A500");
+ case 3 -> net.kyori.adventure.text.format.TextColor.fromHexString("#CC8600");
+ case 4 -> net.kyori.adventure.text.format.TextColor.fromHexString("#E26500");
+ case 5 -> net.kyori.adventure.text.format.TextColor.fromHexString("#F34100");
+ case 6 -> net.kyori.adventure.text.format.TextColor.fromHexString("#FC1E00");
+ case 7 -> net.kyori.adventure.text.format.TextColor.fromHexString("#FE000F");
+ case 8 -> net.kyori.adventure.text.format.TextColor.fromHexString("#F70033");
+ case 9 -> net.kyori.adventure.text.format.TextColor.fromHexString("#E8005A");
+ case 10 -> net.kyori.adventure.text.format.TextColor.fromHexString("#CF0083");
+ case 11 -> net.kyori.adventure.text.format.TextColor.fromHexString("#AE00A9");
+ case 12 -> net.kyori.adventure.text.format.TextColor.fromHexString("#8600CC");
+ case 13 -> net.kyori.adventure.text.format.TextColor.fromHexString("#5B00E7");
+ case 14 -> net.kyori.adventure.text.format.TextColor.fromHexString("#2D00F9");
+ case 15 -> net.kyori.adventure.text.format.TextColor.fromHexString("#020AFE");
+ case 16 -> net.kyori.adventure.text.format.TextColor.fromHexString("#0037F6");
+ case 17 -> net.kyori.adventure.text.format.TextColor.fromHexString("#0068E0");
+ case 18 -> net.kyori.adventure.text.format.TextColor.fromHexString("#009ABC");
+ case 19 -> net.kyori.adventure.text.format.TextColor.fromHexString("#00C68D");
+ case 20 -> net.kyori.adventure.text.format.TextColor.fromHexString("#00E958");
+ case 21 -> net.kyori.adventure.text.format.TextColor.fromHexString("#00FC21");
+ case 22 -> net.kyori.adventure.text.format.TextColor.fromHexString("#1FFC00");
+ case 23 -> net.kyori.adventure.text.format.TextColor.fromHexString("#59E800");
+ default -> net.kyori.adventure.text.format.TextColor.fromHexString("#94C100");
+ };
+ }
+ // DivineMC end - Note Color API
}

View File

@@ -1,16 +0,0 @@
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -2346,6 +_,13 @@
}
// Purpur end
+ // DivineMC start
+ @NotNull
+ public org.bukkit.configuration.file.YamlConfiguration getDivineConfig() {
+ throw new UnsupportedOperationException("Not supported yet");
+ }
+ // DivineMC end
+
/**
* Sends the component to the player
*

View File

@@ -1,19 +0,0 @@
--- a/src/main/java/org/bukkit/command/Command.java
+++ b/src/main/java/org/bukkit/command/Command.java
@@ -33,16 +_,6 @@
protected String usageMessage;
private String permission;
private net.kyori.adventure.text.Component permissionMessage; // Paper
- /**
- * @deprecated Timings will be removed in the future
- */
- @Deprecated(forRemoval = true)
- public co.aikar.timings.Timing timings; // Paper
- /**
- * @deprecated Timings will be removed in the future
- */
- @Deprecated(forRemoval = true)
- @NotNull public String getTimingName() {return getName();} // Paper
protected Command(@NotNull String name) {
this(name, "", "/" + name, new ArrayList<String>());

View File

@@ -1,21 +0,0 @@
--- a/src/main/java/org/bukkit/command/FormattedCommandAlias.java
+++ b/src/main/java/org/bukkit/command/FormattedCommandAlias.java
@@ -12,7 +_,6 @@
public FormattedCommandAlias(@NotNull String alias, @NotNull String[] formatStrings) {
super(alias);
- timings = co.aikar.timings.TimingsManager.getCommandTiming("minecraft", this); // Spigot
this.formatStrings = formatStrings;
}
@@ -119,10 +_,6 @@
return formatString.trim(); // Paper - Causes an extra space at the end, breaks with brig commands
}
-
- @NotNull
- @Override // Paper
- public String getTimingName() {return "Command Forwarder - " + super.getTimingName();} // Paper
private static boolean inRange(int i, int j, int k) {
return i >= j && i <= k;

View File

@@ -1,31 +0,0 @@
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
@@ -39,7 +_,6 @@
register("bukkit", new VersionCommand("version"));
register("bukkit", new ReloadCommand("reload"));
//register("bukkit", new PluginsCommand("plugins")); // Paper
- register("bukkit", new co.aikar.timings.TimingsCommand("timings")); // Paper
}
public void setFallbackCommands() {
@@ -71,7 +_,6 @@
*/
@Override
public boolean register(@NotNull String label, @NotNull String fallbackPrefix, @NotNull Command command) {
- command.timings = co.aikar.timings.TimingsManager.getCommandTiming(fallbackPrefix, command); // Paper
label = label.toLowerCase(Locale.ROOT).trim();
fallbackPrefix = fallbackPrefix.toLowerCase(Locale.ROOT).trim();
boolean registered = register(label, command, false, fallbackPrefix);
@@ -165,12 +_,6 @@
sentCommandLabel = event.getLabel();
parsedArgs = event.getArgs();
// Purpur end - ExecuteCommandEvent
-
- // Paper start - Plugins do weird things to workaround normal registration
- if (target.timings == null) {
- target.timings = co.aikar.timings.TimingsManager.getCommandTiming(null, target);
- }
- // Paper end
try {
//try (co.aikar.timings.Timing ignored = target.timings.startTiming()) { // Paper - use try with resources // Purpur - Remove Timings

View File

@@ -1,11 +0,0 @@
--- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
@@ -259,7 +_,7 @@
// Purpur start
int distance = getVersionFetcher().distance();
final Component message = Component.join(net.kyori.adventure.text.JoinConfiguration.separator(Component.newline()),
- ChatColor.parseMM("<grey>Current Purpur Version: %s%s*", distance == 0 ? "<green>" : distance > 0 ? "<yellow>" : "<red>", Bukkit.getVersion()),
+ ChatColor.parseMM("<grey>Current DivineMC Version: %s%s*", distance == 0 ? "<green>" : distance > 0 ? "<yellow>" : "<red>", Bukkit.getVersion()), // DivineMC - Rebrand
// Purpur end
msg
);

View File

@@ -1,14 +0,0 @@
--- a/src/main/java/org/bukkit/entity/AbstractArrow.java
+++ b/src/main/java/org/bukkit/entity/AbstractArrow.java
@@ -297,4 +_,11 @@
*/
void setShooter(@Nullable org.bukkit.projectiles.ProjectileSource source, boolean resetPickupStatus);
// Paper end - Fix PickupStatus getting reset
+
+ // DivineMC start - Add startFalling method to AbstractArrow
+ /**
+ * Asks projectile to start falling if possible
+ */
+ void startFalling();
+ // DivineMC end - Add startFalling method to AbstractArrow
}

View File

@@ -1,17 +0,0 @@
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -4021,4 +_,14 @@
sendDeathScreen(message);
}
// Purpur end
+
+ // DivineMC start - Open Ender Chest API
+ /**
+ * Opens ender chest for the player
+ *
+ * @param enderChest ender chest
+ * @return whether the chest was opened
+ */
+ boolean openEnderChest(org.bukkit.block.EnderChest enderChest);
+ // DivineMC end - Open Ender Chest API
}

View File

@@ -1,43 +0,0 @@
--- a/src/main/java/org/bukkit/event/block/NotePlayEvent.java
+++ b/src/main/java/org/bukkit/event/block/NotePlayEvent.java
@@ -16,13 +_,21 @@
private static HandlerList handlers = new HandlerList();
private Instrument instrument;
private Note note;
+ private final @org.jetbrains.annotations.Nullable org.bukkit.entity.Player player; // DivineMC - Add player to NotePlayEvent
private boolean cancelled = false;
+ // DivineMC start - Add player to NotePlayEvent
public NotePlayEvent(@NotNull Block block, @NotNull Instrument instrument, @NotNull Note note) {
+ this(block, instrument, note, null);
+ }
+
+ public NotePlayEvent(@NotNull Block block, @NotNull Instrument instrument, @NotNull Note note, @org.jetbrains.annotations.Nullable org.bukkit.entity.Player player) {
super(block);
this.instrument = instrument;
this.note = note;
+ this.player = player;
}
+ // DivineMC end - Add player to NotePlayEvent
@Override
public boolean isCancelled() {
@@ -53,6 +_,18 @@
public Note getNote() {
return note;
}
+
+ // DivineMC start - Add player to NotePlayEvent
+ /**
+ * Gets the {@link org.bukkit.entity.Player} who played the note
+ *
+ * @return player who played the note, if present
+ */
+ @org.jetbrains.annotations.Nullable
+ public org.bukkit.entity.Player getPlayer() {
+ return this.player;
+ }
+ // DivineMC end - Add player to NotePlayEvent
/**
* Overrides the {@link Instrument} to be used.

View File

@@ -1,35 +0,0 @@
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
@@ -720,12 +_,7 @@
throw new IllegalPluginAccessException("Plugin attempted to register " + event + " while not enabled");
}
- executor = new co.aikar.timings.TimedEventExecutor(executor, plugin, null, event); // Paper
- if (false) { // Spigot - RL handles useTimings check now // Paper
- getEventListeners(event).register(new TimedRegisteredListener(listener, executor, priority, plugin, ignoreCancelled));
- } else {
- getEventListeners(event).register(new RegisteredListener(listener, executor, priority, plugin, ignoreCancelled));
- }
+ getEventListeners(event).register(new RegisteredListener(listener, executor, priority, plugin, ignoreCancelled));
}
@NotNull
@@ -955,8 +_,7 @@
@Override
public boolean useTimings() {
- if (true) {return this.paperPluginManager.useTimings();} // Paper
- return co.aikar.timings.Timings.isTimingsEnabled(); // Spigot
+ return false;
}
/**
@@ -966,7 +_,7 @@
*/
@Deprecated(forRemoval = true)
public void useTimings(boolean use) {
- co.aikar.timings.Timings.setTimingsEnabled(use); // Paper
+ // DivineMC - Delete timings
}
// Paper start

View File

@@ -1,28 +0,0 @@
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
@@ -43,7 +_,6 @@
import org.bukkit.plugin.UnknownDependencyException;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
-import org.spigotmc.CustomTimingsHandler; // Spigot
import org.yaml.snakeyaml.error.YAMLException;
/**
@@ -294,7 +_,7 @@
}
}
- EventExecutor executor = new co.aikar.timings.TimedEventExecutor(new EventExecutor() { // Paper
+ EventExecutor executor = new EventExecutor() { // Paper
@Override
public void execute(@NotNull Listener listener, @NotNull Event event) throws EventException { // Paper
try {
@@ -308,7 +_,7 @@
throw new EventException(t);
}
}
- }, plugin, method, eventClass); // Paper
+ }; // DivineMC - Delete Timings
if (false) { // Spigot - RL handles useTimings check now
eventSet.add(new TimedRegisteredListener(listener, executor, eh.priority(), plugin, eh.ignoreCancelled()));
} else {