diff options
author | Jake Potrebic <[email protected]> | 2023-06-08 22:57:24 -0700 |
---|---|---|
committer | Jake Potrebic <[email protected]> | 2023-06-08 22:57:24 -0700 |
commit | f9fc44ff9fdf583beaad413e1f6b21116de83f06 (patch) | |
tree | 7a9e2de626bac407a7332e5abeae7c5f1f908cec /patches/server | |
parent | 9ebf75d89465ef6cb7948521367cf8191eedfec9 (diff) | |
download | Paper-f9fc44ff9fdf583beaad413e1f6b21116de83f06.tar.gz Paper-f9fc44ff9fdf583beaad413e1f6b21116de83f06.zip |
add side to PlayerSignCommandPreprocessEvent
Diffstat (limited to 'patches/server')
-rw-r--r-- | patches/server/0001-Setup-Gradle-project.patch | 5 | ||||
-rw-r--r-- | patches/server/0640-Fix-commands-from-signs-not-firing-command-events.patch | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/patches/server/0001-Setup-Gradle-project.patch b/patches/server/0001-Setup-Gradle-project.patch index 293a413616..c5a9d523e5 100644 --- a/patches/server/0001-Setup-Gradle-project.patch +++ b/patches/server/0001-Setup-Gradle-project.patch @@ -28,10 +28,10 @@ index 3df8c60ab5cd1454660980883f80668d535b742b..37c3a00659ce21623be07317f4f6a45b +/.factorypath diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 -index 0000000000000000000000000000000000000000..ca692b4758172cb139938f28457cf5639a4411cf +index 0000000000000000000000000000000000000000..9a355bbbe57629d0b66f8260ecf461e3bf1a539b --- /dev/null +++ b/build.gradle.kts -@@ -0,0 +1,137 @@ +@@ -0,0 +1,138 @@ +import io.papermc.paperweight.util.* + +plugins { @@ -136,6 +136,7 @@ index 0000000000000000000000000000000000000000..ca692b4758172cb139938f28457cf563 + if (providers.gradleProperty("paper.runDisableWatchdog").getOrElse("false") == "true") { + systemProperty("disable.watchdog", true) + } ++ systemProperty("io.papermc.paper.suppress.sout.nags", true) + + val memoryGb = providers.gradleProperty("paper.runMemoryGb").getOrElse("2") + minHeapSize = "${memoryGb}G" diff --git a/patches/server/0640-Fix-commands-from-signs-not-firing-command-events.patch b/patches/server/0640-Fix-commands-from-signs-not-firing-command-events.patch index 8e0574f4b6..642ec71ff4 100644 --- a/patches/server/0640-Fix-commands-from-signs-not-firing-command-events.patch +++ b/patches/server/0640-Fix-commands-from-signs-not-firing-command-events.patch @@ -58,7 +58,7 @@ index 0000000000000000000000000000000000000000..01a2bc1feec808790bb93618ce46adb9 + } +} diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java -index 4fe156701cf0664d0ab9472f5599fd87ee4ddeb2..80695b2698d2904cec2c54ebe0ef880d95ed9583 100644 +index 4fe156701cf0664d0ab9472f5599fd87ee4ddeb2..ba6f0ba00cd2635bcd19889dca0349b363b079fe 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java @@ -274,7 +274,17 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C @@ -71,7 +71,7 @@ index 4fe156701cf0664d0ab9472f5599fd87ee4ddeb2..80695b2698d2904cec2c54ebe0ef880d + if (org.spigotmc.SpigotConfig.logCommands) { + LOGGER.info("{} issued server command: {}", player.getScoreboardName(), command); + } -+ io.papermc.paper.event.player.PlayerSignCommandPreprocessEvent event = new io.papermc.paper.event.player.PlayerSignCommandPreprocessEvent((org.bukkit.entity.Player) player.getBukkitEntity(), command, new org.bukkit.craftbukkit.util.LazyPlayerSet(player.getServer()), (org.bukkit.block.Sign) io.papermc.paper.util.MCUtil.toBukkitBlock(this.level, this.worldPosition).getState()); ++ io.papermc.paper.event.player.PlayerSignCommandPreprocessEvent event = new io.papermc.paper.event.player.PlayerSignCommandPreprocessEvent((org.bukkit.entity.Player) player.getBukkitEntity(), command, new org.bukkit.craftbukkit.util.LazyPlayerSet(player.getServer()), (org.bukkit.block.Sign) io.papermc.paper.util.MCUtil.toBukkitBlock(this.level, this.worldPosition).getState(), front ? Side.FRONT : Side.BACK); + if (!event.callEvent()) { + return false; + } |