mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 09:09:08 +00:00
Fixed player script enabled button not working right on servers. Added more player events and a getDimension() method to ScriptPlayer. Set player scripts to be off by default.
This commit is contained in:
1 parent
047552d9e5
commit
a9bce4a3e3
9 files changed
+178
-44
No files matched your search
@@ -89,6 +89,23 @@ public class PlayerEvent extends CustomNPCsEvent {
|
||||
}
|
||||
}
|
||||
|
||||
public static class RespawnEvent extends PlayerEvent {
|
||||
public RespawnEvent(IPlayer player) {
|
||||
super(player);
|
||||
}
|
||||
}
|
||||
|
||||
public static class ChangedDimension extends PlayerEvent {
|
||||
public final int fromDim;
|
||||
public final int toDim;
|
||||
|
||||
public ChangedDimension(IPlayer player, int fromDim, int toDim){
|
||||
super(player);
|
||||
this.fromDim = fromDim;
|
||||
this.toDim = toDim;
|
||||
}
|
||||
}
|
||||
|
||||
public static class TimerEvent extends PlayerEvent {
|
||||
public final int id;
|
||||
|
||||
@@ -113,6 +130,27 @@ public class PlayerEvent extends CustomNPCsEvent {
|
||||
}
|
||||
}
|
||||
|
||||
@Cancelable
|
||||
public static class LightningEvent extends PlayerEvent {
|
||||
public LightningEvent(IPlayer player) {
|
||||
super(player);
|
||||
}
|
||||
}
|
||||
|
||||
@Cancelable
|
||||
public static class SoundEvent extends PlayerEvent {
|
||||
public final String name;
|
||||
public final float pitch;
|
||||
public final float volume;
|
||||
|
||||
public SoundEvent(ScriptPlayer player, String name, float pitch, float volume) {
|
||||
super(player);
|
||||
this.name = name;
|
||||
this.pitch = pitch;
|
||||
this.volume = volume;
|
||||
}
|
||||
}
|
||||
|
||||
public static class FallEvent extends PlayerEvent {
|
||||
public final float distance;
|
||||
|
||||
|
||||
Reference in new issue
Block a user