Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
385f313a8b
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: d41796de SPIGOT-7071: Add Player#stopSound(SoundCategory category) 61dae5b2 SPIGOT-7011, SPIGOT-7065: Overhaul of structures CraftBukkit Changes: 991aeda12 SPIGOT-1729, SPIGOT-7090: Keep precision in teleportation between worlds 5c9a5f628 SPIGOT-7071: Add Player#stopSound(SoundCategory category) 68f888ded SPIGOT-7011, SPIGOT-7065: Overhaul of structures 0231a3746 Remove outdated build delay. Spigot Changes: 475f6008 Rebuild patches 8ce1761f Rebuild patches
26 Zeilen
1.2 KiB
Diff
26 Zeilen
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Sweepyoface <github@sweepy.pw>
|
|
Date: Sat, 17 Jun 2017 18:48:21 -0400
|
|
Subject: [PATCH] Add UnknownCommandEvent
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
index 48cf396d30a4964632fff31969995d3c291bb52f..a74f3f4f475626d4713b35166050bbbdc4590a67 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -890,7 +890,13 @@ public final class CraftServer implements Server {
|
|
|
|
// Spigot start
|
|
if (!org.spigotmc.SpigotConfig.unknownCommandMessage.isEmpty()) {
|
|
- sender.sendMessage(org.spigotmc.SpigotConfig.unknownCommandMessage);
|
|
+ // Paper start
|
|
+ org.bukkit.event.command.UnknownCommandEvent event = new org.bukkit.event.command.UnknownCommandEvent(sender, commandLine, org.spigotmc.SpigotConfig.unknownCommandMessage);
|
|
+ Bukkit.getServer().getPluginManager().callEvent(event);
|
|
+ if (event.message() != null) {
|
|
+ sender.sendMessage(event.message());
|
|
+ }
|
|
+ // Paper end
|
|
}
|
|
// Spigot end
|
|
|