Yatopia/patches/api/0008-Disable-reload-command.patch
Ivan Pekov 0c43fe2949
Updated Upstream and Sidestream(s) (Tuinity/EMC/Origami/Purpur/AirplaneLite)
Upstream/An Sidestream has released updates that appears to apply and compile correctly
This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing.

Tuinity Changes:
c04b005 Merge branch 'master' of https://github.com/Spottedleaf/Tuinity into ver/1.16.5
1d169e7 Updated Upstream (Paper)

EMC Changes:
a8914cb8 Remove the ProjectileHitBlockEvent
b8f864b5 Updated Paper
42cd3269 Remove FlowerPotPlantEvent and undeprecate FlowerPotRemoveEvent
64b3edf0 Remove the UUID key for setSpawnedEntity
938c6f1b Convert spawn egg entity tag attributes on creature spawn
4cc80284 Disable entityTag conversion since data version isn't accessible in scope
478d83fe Updated Paper
1e409abf Updated Paper

Origami Changes:
ab42df9 Update Paper

Purpur Changes:
7e8bf66 Updated Upstream (Paper & Tuinity)

AirplaneLite Changes:
3200f2a Add new webhook for notifications
fe01371 Up MC version
c585ff5 Updated Upstream (Tuinity)
2021-01-18 18:40:21 +02:00

31 lines
2.0 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ivan Pekov <ivan@mrivanplays.com>
Date: Mon, 19 Oct 2020 15:48:06 +0300
Subject: [PATCH] Disable reload command
diff --git a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
index 0c7ba0718de2b93d013968ca0fec34ffd423990f..3a726fd145e5bbb1513b74eaae7d768ae6ab4a9f 100644
--- a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
@@ -21,6 +21,19 @@ public class ReloadCommand extends BukkitCommand {
@Override
public boolean execute(@NotNull CommandSender sender, @NotNull String currentAlias, @NotNull String[] args) { // Paper
if (!testPermission(sender)) return true;
+ // Yatopia start - fix lag
+ if (Boolean.parseBoolean(System.getProperty("Yatopia.DisableReloadCommand", "true"))) {
+ sender.sendMessage(ChatColor.RED + "Operation denied.");
+ sender.sendMessage(ChatColor.RED + "Reload command SHOULD NEVER EVER EVER be used in whatever circumstances.");
+ sender.sendMessage(ChatColor.RED + "YatopiaMC team has intentionally disabled it in order to stop you using it, instead of restarting your server.");
+ sender.sendMessage(ChatColor.RED + "---------------------------------------------");
+ sender.sendMessage(ChatColor.RED + "RESTART YOUR SERVER AND NEVER USE /reload");
+ sender.sendMessage(ChatColor.YELLOW + "For plugin developers: learn what a HOTSWAP AGENT is and stop using /reload");
+ sender.sendMessage(ChatColor.RED + "---------------------------------------------");
+ sender.sendMessage(ChatColor.YELLOW + "For more information, join our discord server.");
+ return true;
+ }
+ // Yatopia end
// Paper start - Reload permissions.yml & require confirm
boolean confirmed = System.getProperty("LetMeReload") != null;