geforkt von Mirrors/FastAsyncWorldEdit
Changed Bukkit listeners to cancel the event.
Dieser Commit ist enthalten in:
Ursprung
a36ceecaab
Commit
98afdd7df6
@ -65,7 +65,9 @@ public class WorldEditBlockListener extends BlockListener {
|
|||||||
event.getBlock().getY(), event.getBlock().getZ());
|
event.getBlock().getY(), event.getBlock().getZ());
|
||||||
LocalPlayer player = wrapPlayer(event.getPlayer());
|
LocalPlayer player = wrapPlayer(event.getPlayer());
|
||||||
|
|
||||||
plugin.controller.handleBlockRightClick(player, pos);
|
if (plugin.controller.handleBlockRightClick(player, pos)) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private BukkitPlayer wrapPlayer(Player player) {
|
private BukkitPlayer wrapPlayer(Player player) {
|
||||||
|
@ -57,8 +57,10 @@ public class WorldEditPlayerListener extends PlayerListener {
|
|||||||
* @param event Relevant event details
|
* @param event Relevant event details
|
||||||
*/
|
*/
|
||||||
public void onPlayerCommand(PlayerChatEvent event) {
|
public void onPlayerCommand(PlayerChatEvent event) {
|
||||||
plugin.controller.handleCommand(wrapPlayer(event.getPlayer()),
|
if (plugin.controller.handleCommand(wrapPlayer(event.getPlayer()),
|
||||||
event.getMessage().split(" "));
|
event.getMessage().split(" "))) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private BukkitPlayer wrapPlayer(Player player) {
|
private BukkitPlayer wrapPlayer(Player player) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren