mirror of
https://github.com/kaboomserver/extras.git
synced 2024-11-27 01:45:44 -05:00
Update Paper API to 1.19.4 & limit commandModificationBlockLimit gamerule
This commit is contained in:
parent
4d0d1bb69b
commit
d0246790cb
2 changed files with 5 additions and 4 deletions
2
pom.xml
2
pom.xml
|
@ -15,7 +15,7 @@
|
|||
<dependency>
|
||||
<groupId>io.papermc.paper</groupId>
|
||||
<artifactId>paper-api</artifactId>
|
||||
<version>1.18.2-R0.1-SNAPSHOT</version>
|
||||
<version>1.19.4-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package pw.kaboom.extras.modules.server;
|
||||
|
||||
import io.papermc.paper.event.world.WorldGameRuleChangeEvent;
|
||||
import org.bukkit.GameRule;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
|
||||
import io.papermc.paper.event.world.WorldGameRuleChangeEvent;
|
||||
|
||||
public final class ServerGameRule implements Listener {
|
||||
@EventHandler
|
||||
void onGameRuleChange(final WorldGameRuleChangeEvent event) {
|
||||
|
@ -14,7 +13,9 @@ public final class ServerGameRule implements Listener {
|
|||
if ((gameRule == GameRule.RANDOM_TICK_SPEED
|
||||
&& Integer.parseInt(event.getValue()) > 6)
|
||||
|| (event.getGameRule() == GameRule.SPAWN_RADIUS
|
||||
&& Integer.parseInt(event.getValue()) > 100)) {
|
||||
&& Integer.parseInt(event.getValue()) > 100)
|
||||
|| (event.getGameRule() == GameRule.COMMAND_MODIFICATION_BLOCK_LIMIT
|
||||
&& Integer.parseInt(event.getValue()) > 32768)) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue