mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-18 22:21:26 +01:00
Change event for armorstand spawn
This commit is contained in:
parent
73332fad38
commit
08d55322e5
@ -37,7 +37,7 @@ public class WorldGuardManager {
|
|||||||
continue;
|
continue;
|
||||||
return Jobs.getRestrictedAreaManager().getRestrictedAreasByName(one.getId());
|
return Jobs.getRestrictedAreaManager().getRestrictedAreasByName(one.getId());
|
||||||
}
|
}
|
||||||
} catch (NoSuchMethodError e) {
|
} catch (Exception | NoSuchMethodError e) {
|
||||||
}
|
}
|
||||||
return new ArrayList<RestrictedArea>();
|
return new ArrayList<RestrictedArea>();
|
||||||
}
|
}
|
||||||
|
@ -1002,12 +1002,11 @@ public class JobsPaymentListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
public void onArmorstandPlace(EntitySpawnEvent event) {
|
public void onArmorstandPlace(CreatureSpawnEvent event) {
|
||||||
Entity ent = event.getEntity();
|
Entity ent = event.getEntity();
|
||||||
|
|
||||||
if (!ent.getType().toString().equalsIgnoreCase("ARMOR_STAND"))
|
if (!ent.getType().toString().equalsIgnoreCase("ARMOR_STAND"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Location loc = event.getLocation();
|
Location loc = event.getLocation();
|
||||||
Collection<Entity> ents = loc.getWorld().getNearbyEntities(loc, 4, 4, 4);
|
Collection<Entity> ents = loc.getWorld().getNearbyEntities(loc, 4, 4, 4);
|
||||||
double dis = Double.MAX_VALUE;
|
double dis = Double.MAX_VALUE;
|
||||||
@ -1038,7 +1037,6 @@ public class JobsPaymentListener implements Listener {
|
|||||||
if (jPlayer == null)
|
if (jPlayer == null)
|
||||||
return;
|
return;
|
||||||
Jobs.action(jPlayer, new EntityActionInfo(ent, ActionType.PLACE));
|
Jobs.action(jPlayer, new EntityActionInfo(ent, ActionType.PLACE));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
|
@ -308,7 +308,7 @@ Jobs:
|
|||||||
LEATHER_BOOTS:
|
LEATHER_BOOTS:
|
||||||
income: 1.0
|
income: 1.0
|
||||||
experience: 6.0
|
experience: 6.0
|
||||||
# Add ! at front when you want to pay for crafted items with special names
|
# Add ! at front when you want to pay for crafted items with special names. Always use double quotation marks, same as example
|
||||||
"!Healing Bandage":
|
"!Healing Bandage":
|
||||||
income: 1.0
|
income: 1.0
|
||||||
experience: 6.0
|
experience: 6.0
|
||||||
|
Loading…
Reference in New Issue
Block a user