本文整理汇总了Java中fr.neatmonster.nocheatplus.checks.CheckType类的典型用法代码示例。如果您正苦于以下问题:Java CheckType类的具体用法?Java CheckType怎么用?Java CheckType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CheckType类属于fr.neatmonster.nocheatplus.checks包,在下文中一共展示了CheckType类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onCheckFailure
import fr.neatmonster.nocheatplus.checks.CheckType; //导入依赖的package包/类
@Override
public boolean onCheckFailure(final CheckType checkType, final Player player, final IViolationInfo info) {
double violationGrace;
try {
violationGrace = CivSettings.getDouble(CivSettings.nocheatConfig, "nocheatplus.survivalfly.violation_grace");
} catch (InvalidConfiguration e) {
e.printStackTrace();
return false;
}
if (info.getAddedVl() < violationGrace) {
return true;
}
return false;
}
开发者ID:netizen539,项目名称:civcraft,代码行数:17,代码来源:NoCheatPlusSurvialFlyHandler.java
示例2: onCheckFailure
import fr.neatmonster.nocheatplus.checks.CheckType; //导入依赖的package包/类
@Override
public boolean onCheckFailure(CheckType checkType, Player player, IViolationInfo iViolationInfo) {
if(!Config.noCheatPlusCompatibilityMode || APIUtils.needsSynchronization(checkType)){
return false;
}
if((checkType == CheckType.MOVING_SURVIVALFLY || checkType == CheckType.FIGHT_FASTHEAL) && (player.hasMetadata("swimming") || player.hasMetadata("falling"))){
return true;
}
return false;
}
开发者ID:4a2e532e,项目名称:RealisticSwimming,代码行数:11,代码来源:NoCheatPlusListener.java
示例3: onLeave
import fr.neatmonster.nocheatplus.checks.CheckType; //导入依赖的package包/类
@EventHandler
public void onLeave(PlayerQuitEvent e) {
Player p = e.getPlayer();
if (NCPPlayer.contains(p.getUniqueId().toString())) {
try {
NCPExemptionManager.unexempt(p, CheckType.MOVING_SURVIVALFLY);
NCPPlayer.remove(p.getUniqueId().toString());
} catch (Exception ex){}
}
}
开发者ID:TreyRuffy,项目名称:TreysDoubleJump,代码行数:11,代码来源:DoubleJump.java
示例4: allowDoubleJump
import fr.neatmonster.nocheatplus.checks.CheckType; //导入依赖的package包/类
protected void allowDoubleJump(final Player player) {
if (tasks.containsKey(player.getName()))
DoubleJump4NCPPlugin.getInstance().getServer().getScheduler().cancelTask(tasks.get(player.getName()));
NCPExemptionManager.exemptPermanently(player, CheckType.MOVING_SURVIVALFLY);
tasks.put(player.getName(), DoubleJump4NCPPlugin.getInstance().getServer().getScheduler().scheduleSyncDelayedTask(DoubleJump4NCPPlugin.getInstance(), new Runnable() {
@Override
public void run() {
NCPExemptionManager.unexempt(player, CheckType.MOVING_SURVIVALFLY);
tasks.remove(player.getName());
}
}, 60L));
}
开发者ID:HyperPlay,项目名称:DoubleJump4NCP,代码行数:15,代码来源:NoCheatPlusHandler.java
示例5: NoCheatPlusListener
import fr.neatmonster.nocheatplus.checks.CheckType; //导入依赖的package包/类
public NoCheatPlusListener(){
NCPHookManager.addHook(CheckType.ALL, this);
}
开发者ID:4a2e532e,项目名称:RealisticSwimming,代码行数:4,代码来源:NoCheatPlusListener.java
示例6: onMove
import fr.neatmonster.nocheatplus.checks.CheckType; //导入依赖的package包/类
@EventHandler
public void onMove(PlayerMoveEvent e) {
final Player p = e.getPlayer();
if (p.isFlying()) {
return;
}
if (!p.hasPermission("tdj.use")) {
return;
}
if (p.getGameMode() == GameMode.SPECTATOR) {
return;
}
if (p.getGameMode() == GameMode.CREATIVE) {
return;
}
if (!ConfigManager.getConfig().getStringList("EnabledWorlds").contains(p.getWorld().getName())){
return;
}
if (!p.isOnGround()) {
return;
}
if (cooldown.containsKey(p)) {
return;
}
if (DoubleJumpCommand.DisablePlayers.contains(p.getUniqueId().toString())) {
return;
}
if (FlightCommand.FlyingPlayers.contains(p.getUniqueId().toString())) {
return;
}
if (Grounded.contains(p.getUniqueId().toString())) {
Grounded.remove(p.getUniqueId().toString());
}
if (Bukkit.getPluginManager().getPlugin("NoCheatPlus") != null) {
if (p.hasPermission("tdj.ncp")) {
if (NCPExemptionManager.isExempted(p, CheckType.MOVING_SURVIVALFLY)) {
p.setAllowFlight(true);
return;
}
NCPExemptionManager.exemptPermanently(p, CheckType.MOVING_SURVIVALFLY);
p.setAllowFlight(true);
NCPPlayer.add(p.getUniqueId().toString());
Bukkit.getScheduler().scheduleSyncDelayedTask(TreysDoubleJump.getPlugin(TreysDoubleJump.class), new Runnable() {
@Override
public void run() {
try {
NCPExemptionManager.unexempt(p, CheckType.MOVING_SURVIVALFLY);
NCPPlayer.remove(p.getUniqueId().toString());
} catch (Exception ex){}
}
}, 60L);
return;
}
return;
}
p.setAllowFlight(true);
}
开发者ID:TreyRuffy,项目名称:TreysDoubleJump,代码行数:62,代码来源:DoubleJump.java
示例7: init
import fr.neatmonster.nocheatplus.checks.CheckType; //导入依赖的package包/类
public static void init() {
NCPHookManager.addHook(CheckType.MOVING_SURVIVALFLY, new NoCheatPlusSurvialFlyHandler());
}
开发者ID:netizen539,项目名称:civcraft,代码行数:4,代码来源:NoCheatPlusSurvialFlyHandler.java
示例8: exemptBlockPlaceHacks
import fr.neatmonster.nocheatplus.checks.CheckType; //导入依赖的package包/类
public void exemptBlockPlaceHacks(Player p) {
NCPExemptionManager.exemptPermanently(p, CheckType.BLOCKPLACE);
//NCPExemptionManager.exemptPermanently(p, CheckType.FIGHT_NOSWING);
}
开发者ID:xize,项目名称:manco2,代码行数:5,代码来源:NCPHook.java
示例9: unExcemptBlockPlaceHacks
import fr.neatmonster.nocheatplus.checks.CheckType; //导入依赖的package包/类
public void unExcemptBlockPlaceHacks(Player p) {
NCPExemptionManager.unexempt(p, CheckType.BLOCKPLACE);
}
开发者ID:xize,项目名称:manco2,代码行数:4,代码来源:NCPHook.java
示例10: isBlockPlaceExempted
import fr.neatmonster.nocheatplus.checks.CheckType; //导入依赖的package包/类
public boolean isBlockPlaceExempted(String p) {
return NCPExemptionManager.isExempted(p, CheckType.BLOCKPLACE);
}
开发者ID:xize,项目名称:manco2,代码行数:4,代码来源:NCPHook.java
注:本文中的fr.neatmonster.nocheatplus.checks.CheckType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论