Blablablabla
This commit is contained in:
Binary file not shown.
@@ -202,6 +202,7 @@ public class Arena
|
|||||||
|
|
||||||
// Announce and notify.
|
// Announce and notify.
|
||||||
MAUtils.tellAll(this, Msg.ARENA_START);
|
MAUtils.tellAll(this, Msg.ARENA_START);
|
||||||
|
|
||||||
for (MobArenaListener listener : plugin.getAM().listeners)
|
for (MobArenaListener listener : plugin.getAM().listeners)
|
||||||
listener.onArenaStart(this);
|
listener.onArenaStart(this);
|
||||||
|
|
||||||
@@ -619,23 +620,10 @@ public class Arena
|
|||||||
* Give the player back his inventory and record his last wave.
|
* Give the player back his inventory and record his last wave.
|
||||||
* Called when a player dies or leaves prematurely.
|
* Called when a player dies or leaves prematurely.
|
||||||
* @param p A player
|
* @param p A player
|
||||||
|
* @param dead If the player died or not
|
||||||
*/
|
*/
|
||||||
/*private void finishArenaPlayer(Player p)
|
|
||||||
{
|
|
||||||
if (!arenaPlayers.contains(p) && !lobbyPlayers.contains(p))
|
|
||||||
return;
|
|
||||||
|
|
||||||
removeClassPermissions(p);
|
|
||||||
MAUtils.clearInventory(p);
|
|
||||||
restoreInvAndGiveRewards(p);
|
|
||||||
|
|
||||||
if (log != null && spawnThread != null)
|
|
||||||
log.players.get(p).lastWave = spawnThread.getWave() - 1;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
private void finishArenaPlayer(Player p, boolean dead)
|
private void finishArenaPlayer(Player p, boolean dead)
|
||||||
{
|
{
|
||||||
System.out.println(p.getName() + " in finishArenaPlayer");
|
|
||||||
if (!arenaPlayers.contains(p) && !lobbyPlayers.contains(p))
|
if (!arenaPlayers.contains(p) && !lobbyPlayers.contains(p))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -733,6 +721,7 @@ public class Arena
|
|||||||
if (attachments.get(p) == null) return;
|
if (attachments.get(p) == null) return;
|
||||||
|
|
||||||
for (PermissionAttachment pa : attachments.get(p))
|
for (PermissionAttachment pa : attachments.get(p))
|
||||||
|
if (pa != null)
|
||||||
pa.remove();
|
pa.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1238,7 +1227,8 @@ public class Arena
|
|||||||
// Economy money
|
// Economy money
|
||||||
if (stack.getTypeId() == MobArena.ECONOMY_MONEY_ID)
|
if (stack.getTypeId() == MobArena.ECONOMY_MONEY_ID)
|
||||||
{
|
{
|
||||||
if (plugin.Methods.hasMethod() && !plugin.Method.getAccount(p.getName()).hasEnough(stack.getAmount()))
|
//if (plugin.Methods.hasMethod() && !plugin.Method.getAccount(p.getName()).hasEnough(stack.getAmount()))
|
||||||
|
if (plugin.Methods.hasMethod() && !(plugin.Method.getAccount(p.getName()).balance() >= stack.getAmount()))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Normal stack
|
// Normal stack
|
||||||
@@ -1297,9 +1287,9 @@ public class Arena
|
|||||||
MAUtils.tellPlayer(p, Msg.JOIN_TOO_FAR);
|
MAUtils.tellPlayer(p, Msg.JOIN_TOO_FAR);
|
||||||
else if (emptyInvJoin && !MAUtils.hasEmptyInventory(p))
|
else if (emptyInvJoin && !MAUtils.hasEmptyInventory(p))
|
||||||
MAUtils.tellPlayer(p, Msg.JOIN_EMPTY_INV);
|
MAUtils.tellPlayer(p, Msg.JOIN_EMPTY_INV);
|
||||||
/*else if (!canAfford(p) || !takeFee(p))
|
else if (!canAfford(p))// || !takeFee(p))
|
||||||
MAUtils.tellPlayer(p, Msg.JOIN_FEE_REQUIRED, MAUtils.listToString(entryFee, plugin));
|
MAUtils.tellPlayer(p, Msg.JOIN_FEE_REQUIRED, MAUtils.listToString(entryFee, plugin));
|
||||||
else if (emptyInvJoin && !MAUtils.hasEmptyInventory(p))
|
/*else if (emptyInvJoin && !MAUtils.hasEmptyInventory(p))
|
||||||
MAUtils.tellPlayer(p, Msg.JOIN_EMPTY_INV);
|
MAUtils.tellPlayer(p, Msg.JOIN_EMPTY_INV);
|
||||||
else if (!emptyInvJoin && !MAUtils.storeInventory(p))
|
else if (!emptyInvJoin && !MAUtils.storeInventory(p))
|
||||||
MAUtils.tellPlayer(p, Msg.JOIN_STORE_INV_FAIL);*/
|
MAUtils.tellPlayer(p, Msg.JOIN_STORE_INV_FAIL);*/
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import org.bukkit.entity.Player;
|
|||||||
import com.garbagemule.MobArena.waves.Wave.WaveBranch;
|
import com.garbagemule.MobArena.waves.Wave.WaveBranch;
|
||||||
import com.garbagemule.MobArena.waves.Wave.WaveType;
|
import com.garbagemule.MobArena.waves.Wave.WaveType;
|
||||||
|
|
||||||
public class MobArenaListener
|
public abstract class MobArenaListener
|
||||||
{
|
{
|
||||||
protected MobArena plugin;
|
protected MobArena plugin;
|
||||||
|
|
||||||
|
|||||||
@@ -244,7 +244,7 @@ public class WaveUtils
|
|||||||
wellDefined = false;
|
wellDefined = false;
|
||||||
}
|
}
|
||||||
// OPTIONAL: Wave
|
// OPTIONAL: Wave
|
||||||
int wave = config.getInt(path + "wave", 0);
|
int wave = config.getInt(path + "wave", frequency);
|
||||||
if (wave < 0)
|
if (wave < 0)
|
||||||
{
|
{
|
||||||
MobArena.warning("'wave' must be greater than 0 in " + path);
|
MobArena.warning("'wave' must be greater than 0 in " + path);
|
||||||
|
|||||||
Reference in New Issue
Block a user