mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-11-26 12:36:00 +01:00
v0.88.1 - Default rewards
This commit is contained in:
parent
a48859be6b
commit
9b795c3174
BIN
MobArena.jar
BIN
MobArena.jar
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
name: MobArena
|
||||
main: com.garbagemule.MobArena.MobArena
|
||||
version: 0.88
|
||||
version: 0.88.1
|
||||
commands:
|
||||
mobarena:
|
||||
description: Base command for MobArena
|
||||
|
@ -75,9 +75,12 @@ public class MAMonsterListener extends EntityListener
|
||||
return;
|
||||
|
||||
if (event.getReason() == TargetReason.FORGOT_TARGET)
|
||||
event.setCancelled(true);
|
||||
event.setTarget(MASpawnThread.getClosestPlayer(event.getEntity()));
|
||||
|
||||
if (event.getReason() == TargetReason.TARGET_DIED)
|
||||
event.setTarget(MASpawnThread.getClosestPlayer(event.getEntity()));
|
||||
|
||||
if (event.getReason() == TargetReason.CLOSEST_PLAYER)
|
||||
event.setTarget(MASpawnThread.getClosestPlayer(event.getEntity()));
|
||||
}
|
||||
}
|
@ -316,13 +316,27 @@ public class MAUtils
|
||||
int wave;
|
||||
String rewards;
|
||||
|
||||
/* Check if the keys exist in the config-file, if not,
|
||||
* simply return the empty map. */
|
||||
List<String> waves = c.getKeys("rewards.waves." + type);
|
||||
if (waves == null)
|
||||
return result;
|
||||
/* Check if the keys exist in the config-file, if not, set some. */
|
||||
if (c.getKeys("rewards.waves." + type) == null)
|
||||
{
|
||||
if (type.equals("every"))
|
||||
{
|
||||
c.setProperty("rewards.waves.every.3", "feather, bone, stick");
|
||||
c.setProperty("rewards.waves.every.5", "dirt:4, gravel:4, stone:4");
|
||||
c.setProperty("rewards.waves.every.10", "iron_ingot:10, gold_ingot:8");
|
||||
}
|
||||
else if (type.equals("after"))
|
||||
{
|
||||
c.setProperty("rewards.waves.after.7", "minecart, storage_minecart, powered_minecart");
|
||||
c.setProperty("rewards.waves.after.13", "iron_sword, iron_pickaxe, iron_spade");
|
||||
c.setProperty("rewards.waves.after.16", "diamon_sword");
|
||||
}
|
||||
|
||||
// Else, put all the rewards in the map.
|
||||
c.save();
|
||||
}
|
||||
List<String> waves = c.getKeys("rewards.waves." + type);
|
||||
|
||||
// Put all the rewards in the map.
|
||||
for (String n : waves)
|
||||
{
|
||||
if (!n.matches("[0-9]+"))
|
||||
|
Loading…
Reference in New Issue
Block a user