mirror of
https://github.com/kaboomserver/extras.git
synced 2024-11-23 16:08:18 -05:00
Add limiter for command block minecarts
This commit is contained in:
parent
dbd71922d0
commit
7eaf813228
1 changed files with 5 additions and 0 deletions
|
@ -3,6 +3,7 @@ package pw.kaboom.extras.modules.server;
|
|||
import org.bukkit.block.CommandBlock;
|
||||
import org.bukkit.command.BlockCommandSender;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.minecart.CommandMinecart;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.server.ServerCommandEvent;
|
||||
|
@ -144,6 +145,10 @@ public final class ServerCommand implements Listener {
|
|||
|
||||
commandBlock.setCommand("");
|
||||
commandBlock.update();
|
||||
} else if (sender instanceof CommandMinecart) {
|
||||
final CommandMinecart commandMinecart = (CommandMinecart) sender;
|
||||
|
||||
commandMinecart.setCommand("");
|
||||
}
|
||||
|
||||
final String command = event.getCommand();
|
||||
|
|
Loading…
Reference in a new issue