mirror of
https://github.com/Zrips/Jobs.git
synced 2024-12-31 21:37:57 +01:00
Change event for armorstand spawn
This commit is contained in:
parent
73332fad38
commit
08d55322e5
@ -37,7 +37,7 @@ public class WorldGuardManager {
|
||||
continue;
|
||||
return Jobs.getRestrictedAreaManager().getRestrictedAreasByName(one.getId());
|
||||
}
|
||||
} catch (NoSuchMethodError e) {
|
||||
} catch (Exception | NoSuchMethodError e) {
|
||||
}
|
||||
return new ArrayList<RestrictedArea>();
|
||||
}
|
||||
|
@ -1002,12 +1002,11 @@ public class JobsPaymentListener implements Listener {
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
public void onArmorstandPlace(EntitySpawnEvent event) {
|
||||
public void onArmorstandPlace(CreatureSpawnEvent event) {
|
||||
Entity ent = event.getEntity();
|
||||
|
||||
if (!ent.getType().toString().equalsIgnoreCase("ARMOR_STAND"))
|
||||
return;
|
||||
|
||||
Location loc = event.getLocation();
|
||||
Collection<Entity> ents = loc.getWorld().getNearbyEntities(loc, 4, 4, 4);
|
||||
double dis = Double.MAX_VALUE;
|
||||
@ -1038,7 +1037,6 @@ public class JobsPaymentListener implements Listener {
|
||||
if (jPlayer == null)
|
||||
return;
|
||||
Jobs.action(jPlayer, new EntityActionInfo(ent, ActionType.PLACE));
|
||||
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
|
@ -308,7 +308,7 @@ Jobs:
|
||||
LEATHER_BOOTS:
|
||||
income: 1.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":
|
||||
income: 1.0
|
||||
experience: 6.0
|
||||
|
Loading…
Reference in New Issue
Block a user