当前位置: 首页>>代码示例>>Java>>正文


Java Player.hasPlayedBefore方法代码示例

本文整理汇总了Java中org.bukkit.entity.Player.hasPlayedBefore方法的典型用法代码示例。如果您正苦于以下问题:Java Player.hasPlayedBefore方法的具体用法?Java Player.hasPlayedBefore怎么用?Java Player.hasPlayedBefore使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.bukkit.entity.Player的用法示例。


在下文中一共展示了Player.hasPlayedBefore方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onPlayerSpawnLocation

import org.bukkit.entity.Player; //导入方法依赖的package包/类
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onPlayerSpawnLocation(PlayerSpawnLocationEvent event) {
    Player player = event.getPlayer();
    if (!player.hasPlayedBefore()) {
        if (this.canApply() && this.setCooldown(player, player.getUniqueId(), this.defaultCooldown, true)) {
            this.setPaused(player.getUniqueId(), true);
            player.sendMessage(ChatColor.GREEN + "You now have your " + getDisplayName() + ChatColor.GREEN + " timer.");
        }
    } else {
        // If a player has their timer paused and they are not in a safezone, un-pause for them.
        // We do this because disconnection pauses PVP Protection.
        if (this.isPaused(player) && getRemaining(player) > 0L && !plugin.getFactionManager().getFactionAt(event.getSpawnLocation()).isSafezone()) {
            this.setPaused(player.getUniqueId(), false);
        }
    }
}
 
开发者ID:funkemunky,项目名称:HCFCore,代码行数:17,代码来源:InvincibilityTimer.java

示例2: allowNewPlayer

import org.bukkit.entity.Player; //导入方法依赖的package包/类
@EventHandler(
		ignoreCancelled = false,
		priority = EventPriority.HIGH)
public void allowNewPlayer(PlayerLoginEvent event) {
	Player player = event.getPlayer();
	if(!player.hasPlayedBefore() && event.getResult() == Result.KICK_FULL && !player.isBanned()) {
		if(!inst.getConfig().getBoolean("new-players-kick-if-full")) {
			event.allow();
		}
	}
}
 
开发者ID:ramidzkh,项目名称:Bssentials-Reloaded,代码行数:12,代码来源:AverageJoe.java

示例3: onJoin

import org.bukkit.entity.Player; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
@EventHandler
public void onJoin(PlayerJoinEvent event)
{
	Player player = event.getPlayer();
    showAllSleeping(player);
	if(!player.hasPlayedBefore())
	{
		fatigue.getScore(player).setScore(0);
	}
}
 
开发者ID:FattyMieo,项目名称:SurvivalPlus,代码行数:12,代码来源:BedFatigue.java

示例4: onFirstJoin

import org.bukkit.entity.Player; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
@EventHandler
public void onFirstJoin(PlayerJoinEvent event)
{
	Player player = event.getPlayer();
	if(!player.hasPlayedBefore())
	{
		carbon.getScore(player).setScore(960);
		protein.getScore(player).setScore(240);
		salts.getScore(player).setScore(360);
	}
}
 
开发者ID:FattyMieo,项目名称:SurvivalPlus,代码行数:13,代码来源:FoodDiversityConsume.java

示例5: onFirstJoin

import org.bukkit.entity.Player; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
@EventHandler
public void onFirstJoin(PlayerJoinEvent event)
{
	Player player = event.getPlayer();
	if(!player.hasPlayedBefore())
	{
		thirst.getScore(player).setScore(30);
	}
}
 
开发者ID:FattyMieo,项目名称:SurvivalPlus,代码行数:11,代码来源:Consume.java

示例6: onPlayerJoin

import org.bukkit.entity.Player; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
@EventHandler
public void onPlayerJoin(PlayerJoinEvent e)
{
	Player player = e.getPlayer();
	if(!player.hasPlayedBefore())
	{
		boardHunger.getScore(player).setScore(0);
		boardThirst.getScore(player).setScore(0);
		boardFatigue.getScore(player).setScore(1);
		boardNutrients.getScore(player).setScore(1);
	}
	SetupScorebard(player);
}
 
开发者ID:FattyMieo,项目名称:SurvivalPlus,代码行数:15,代码来源:ScoreboardStats.java

示例7: onFirstJoin

import org.bukkit.entity.Player; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
@EventHandler
public void onFirstJoin(PlayerJoinEvent event)
{
	Player player = event.getPlayer();
	if(!player.hasPlayedBefore())
	{
		fatigue.getScore(player).setScore(0);
	}
}
 
开发者ID:FattyMieo,项目名称:SurvivalPlus,代码行数:11,代码来源:BedFatigue.java

示例8: onPlayerSpawn

import org.bukkit.entity.Player; //导入方法依赖的package包/类
@EventHandler(ignoreCancelled = true, priority = EventPriority.NORMAL)
public void onPlayerSpawn(PlayerSpawnLocationEvent event) {
    Player player = event.getPlayer();
    if (!player.hasPlayedBefore()) {
        plugin.getEconomyManager().addBalance(player.getUniqueId(), 250); // give player some starting money
        event.setSpawnLocation(Bukkit.getWorld(DEFAULT_WORLD_NAME).getSpawnLocation().add(-3.5, 76, 6.5));
    }
}
 
开发者ID:funkemunky,项目名称:HCFCore,代码行数:9,代码来源:WorldListener.java

示例9: getMoney

import org.bukkit.entity.Player; //导入方法依赖的package包/类
public double getMoney(UUID player) {
	Player ply = getPlayer(player);
	if (ply != null && ply.hasPlayedBefore()) {
		return econ.getBalance(ply);
	}
	return -1.0d;
}
 
开发者ID:cjburkey01,项目名称:ClaimChunk,代码行数:8,代码来源:Econ.java

示例10: isNew

import org.bukkit.entity.Player; //导入方法依赖的package包/类
@Override
protected boolean isNew(Player player) {
    return !player.hasPlayedBefore();
}
 
开发者ID:games647,项目名称:Minefana,代码行数:5,代码来源:BukkitPlayerCollector.java


注:本文中的org.bukkit.entity.Player.hasPlayedBefore方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。