mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-09-30 07:27:29 +02:00
= [API] Player -> NCPPlayer (to acquire the config/data of the player)
This commit is contained in:
parent
c03cfc1a1f
commit
2bca6481b1
2
pom.xml
2
pom.xml
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<!-- Informations -->
|
<!-- Informations -->
|
||||||
<name>NoCheatPlus</name>
|
<name>NoCheatPlus</name>
|
||||||
<version>3.6</version>
|
<version>3.6_1</version>
|
||||||
<description>Detect and fight the exploitation of various flaws/bugs in Minecraft.</description>
|
<description>Detect and fight the exploitation of various flaws/bugs in Minecraft.</description>
|
||||||
<url>http://dev.bukkit.org/server-mods/nocheatplus</url>
|
<url>http://dev.bukkit.org/server-mods/nocheatplus</url>
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package fr.neatmonster.nocheatplus.checks;
|
package fr.neatmonster.nocheatplus.checks;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.event.Cancellable;
|
import org.bukkit.event.Cancellable;
|
||||||
import org.bukkit.event.Event;
|
import org.bukkit.event.Event;
|
||||||
import org.bukkit.event.HandlerList;
|
import org.bukkit.event.HandlerList;
|
||||||
@ -26,19 +25,19 @@ public abstract class CheckEvent extends Event implements Cancellable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** The check which has triggered this event. */
|
/** The check which has triggered this event. */
|
||||||
private final Check check;
|
private final Check check;
|
||||||
|
|
||||||
/** The player who has triggered this event. */
|
/** The player who has triggered this event. */
|
||||||
private NCPPlayer player;
|
private final NCPPlayer player;
|
||||||
|
|
||||||
/** The actions which are going to be executed if the event isn't cancelled. */
|
/** The actions which are going to be executed if the event isn't cancelled. */
|
||||||
private ActionList actions;
|
private ActionList actions;
|
||||||
|
|
||||||
/** The violation level of the player for the specified check. */
|
/** The violation level of the player for the specified check. */
|
||||||
private double vL;
|
private double vL;
|
||||||
|
|
||||||
/** The boolean used to know if the event is cancelled. */
|
/** The boolean used to know if the event is cancelled. */
|
||||||
private boolean cancel = false;
|
private boolean cancel = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new check event.
|
* Instantiates a new check event.
|
||||||
@ -91,8 +90,8 @@ public abstract class CheckEvent extends Event implements Cancellable {
|
|||||||
*
|
*
|
||||||
* @return the player
|
* @return the player
|
||||||
*/
|
*/
|
||||||
public Player getPlayer() {
|
public NCPPlayer getPlayer() {
|
||||||
return player.getBukkitPlayer();
|
return player;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -132,16 +131,6 @@ public abstract class CheckEvent extends Event implements Cancellable {
|
|||||||
this.cancel = cancel;
|
this.cancel = cancel;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the player who has triggered the event.
|
|
||||||
*
|
|
||||||
* @param player
|
|
||||||
* the new player
|
|
||||||
*/
|
|
||||||
public void setPlayer(final Player player) {
|
|
||||||
this.player = NCPPlayer.getPlayer(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the violation level of the player for the specified check.
|
* Sets the violation level of the player for the specified check.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user