mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
Re-added respawnATS
This commit is contained in:
@ -462,7 +462,7 @@ public class Combat {
|
||||
|
||||
Player defender = (Player) target;
|
||||
|
||||
if (defender.getHealth() >= 1) {
|
||||
if (System.currentTimeMillis() >= Users.getProfile(defender).getRespawnATS() + 5) {
|
||||
baseXP = 20 * configInstance.getPlayerVersusPlayerXP();
|
||||
}
|
||||
}
|
||||
|
@ -40,8 +40,9 @@ public class Users {
|
||||
* Add a new user.
|
||||
*
|
||||
* @param player The player to create a user record for
|
||||
* @return the player's profile
|
||||
*/
|
||||
public static void addUser(Player player) {
|
||||
public static PlayerProfile addUser(Player player) {
|
||||
String playerName = player.getName();
|
||||
|
||||
for (Iterator<PlayerProfile> it = profiles.iterator() ; it.hasNext() ; ) {
|
||||
@ -50,12 +51,15 @@ public class Users {
|
||||
if (playerProfile.getPlayerName().equals(playerName)) {
|
||||
//The player object is different on each reconnection and must be updated
|
||||
playerProfile.setPlayer(player);
|
||||
return;
|
||||
return playerProfile;
|
||||
}
|
||||
}
|
||||
|
||||
//New player, or already removed from the list
|
||||
profiles.add(new PlayerProfile(player, true));
|
||||
PlayerProfile playerProfile = new PlayerProfile(player, true);
|
||||
|
||||
profiles.add(playerProfile);
|
||||
return playerProfile;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user