Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-25 02:20:07 +01:00
Made events respect isCancelled()
Dieser Commit ist enthalten in:
Ursprung
4d6bb6d746
Commit
a313f2e93e
@ -70,6 +70,9 @@ public class WorldEditPlayerListener extends PlayerListener {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) {
|
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) {
|
||||||
|
if (event.isCancelled())
|
||||||
|
return;
|
||||||
|
|
||||||
String[] split = event.getMessage().split(" ");
|
String[] split = event.getMessage().split(" ");
|
||||||
|
|
||||||
if (plugin.getWorldEdit().handleCommand(wrapPlayer(event.getPlayer()), split)) {
|
if (plugin.getWorldEdit().handleCommand(wrapPlayer(event.getPlayer()), split)) {
|
||||||
@ -84,6 +87,8 @@ public class WorldEditPlayerListener extends PlayerListener {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void onPlayerInteract(PlayerInteractEvent event) {
|
public void onPlayerInteract(PlayerInteractEvent event) {
|
||||||
|
if (event.isCancelled())
|
||||||
|
return;
|
||||||
if (event.getAction() == Action.LEFT_CLICK_BLOCK) {
|
if (event.getAction() == Action.LEFT_CLICK_BLOCK) {
|
||||||
LocalWorld world = new BukkitWorld(event.getClickedBlock().getWorld());
|
LocalWorld world = new BukkitWorld(event.getClickedBlock().getWorld());
|
||||||
WorldVector pos = new WorldVector(world, event.getClickedBlock().getX(),
|
WorldVector pos = new WorldVector(world, event.getClickedBlock().getX(),
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren