Removed unnecessary events from global script

This commit is contained in:
Anuken
2020-08-18 17:04:01 -04:00
parent 26acf7cbbc
commit 3d5236dfd3
3 changed files with 6 additions and 6 deletions

View File

@@ -166,13 +166,13 @@ public class EventType{
}
}
/** Called when the player sets a specific block. */
public static class TapConfigEvent{
/** Called when the configures sets a specific block. */
public static class ConfigEvent{
public final Building tile;
public final Player player;
public final Object value;
public TapConfigEvent(Building tile, Player player, Object value){
public ConfigEvent(Building tile, Player player, Object value){
this.tile = tile;
this.player = player;
this.value = value;

View File

@@ -212,7 +212,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
if(net.server() && (!Units.canInteract(player, tile) ||
!netServer.admins.allowAction(player, ActionType.configure, tile.tile(), action -> action.config = value))) throw new ValidateException(player, "Player cannot configure a tile.");
tile.configured(player, value);
Core.app.post(() -> Events.fire(new TapConfigEvent(tile, player, value)));
Core.app.post(() -> Events.fire(new ConfigEvent(tile, player, value)));
}
@Remote(targets = Loc.both, called = Loc.both, forward = true)