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 -->
|
||||
<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>
|
||||
<url>http://dev.bukkit.org/server-mods/nocheatplus</url>
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
package fr.neatmonster.nocheatplus.checks;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
@ -29,7 +28,7 @@ public abstract class CheckEvent extends Event implements Cancellable {
|
||||
private final Check check;
|
||||
|
||||
/** 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. */
|
||||
private ActionList actions;
|
||||
@ -91,8 +90,8 @@ public abstract class CheckEvent extends Event implements Cancellable {
|
||||
*
|
||||
* @return the player
|
||||
*/
|
||||
public Player getPlayer() {
|
||||
return player.getBukkitPlayer();
|
||||
public NCPPlayer getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -132,16 +131,6 @@ public abstract class CheckEvent extends Event implements Cancellable {
|
||||
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.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user