mirror of
https://github.com/GTNewHorizons/CraftTweaker.git
synced 2026-11-21 12:32:29 +00:00
Updated to 1.11.2 API version
Does not mean the added functions are implemented in the prior versions, but it means they all compile against the same API and ZS version
This commit is contained in:
140 files changed
+6307
-6387
No files matched your search
+26
-34
@@ -1,50 +1,42 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
package minetweaker.api.event;
|
||||
|
||||
import minetweaker.api.entity.IEntity;
|
||||
import minetweaker.api.player.IPlayer;
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenGetter;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
import stanhebben.zenscript.annotations.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Stan
|
||||
*/
|
||||
@ZenClass("minetweaker.event.PlayerInteractEntityEvent")
|
||||
public class PlayerInteractEntityEvent {
|
||||
private final IPlayer player;
|
||||
private final IEntity entity;
|
||||
private boolean canceled;
|
||||
|
||||
public PlayerInteractEntityEvent(IPlayer player, IEntity entity) {
|
||||
this.player = player;
|
||||
this.entity = entity;
|
||||
canceled = false;
|
||||
}
|
||||
private final IPlayer player;
|
||||
private final IEntity entity;
|
||||
private boolean canceled;
|
||||
|
||||
@ZenMethod
|
||||
public void cancel() {
|
||||
canceled = true;
|
||||
}
|
||||
public PlayerInteractEntityEvent(IPlayer player, IEntity entity) {
|
||||
this.player = player;
|
||||
this.entity = entity;
|
||||
canceled = false;
|
||||
}
|
||||
|
||||
@ZenGetter("canceled")
|
||||
public boolean isCanceled() {
|
||||
return canceled;
|
||||
}
|
||||
@ZenMethod
|
||||
public void cancel() {
|
||||
canceled = true;
|
||||
}
|
||||
|
||||
@ZenGetter("player")
|
||||
public IPlayer getPlayer() {
|
||||
return player;
|
||||
}
|
||||
@ZenGetter("canceled")
|
||||
public boolean isCanceled() {
|
||||
return canceled;
|
||||
}
|
||||
|
||||
@ZenGetter("entity")
|
||||
public IEntity getEntity() {
|
||||
return entity;
|
||||
}
|
||||
@ZenGetter("player")
|
||||
public IPlayer getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
||||
@ZenGetter("entity")
|
||||
public IEntity getEntity() {
|
||||
return entity;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user