Personalize messages differencing between block an entities
This commit is contained in:
parent
f2e9f87fed
commit
f2aa22123c
|
@ -53,7 +53,7 @@ public class EntityLimitListener implements Listener {
|
||||||
for (Entity ent : e.getVehicle().getLocation().getWorld().getNearbyEntities(e.getVehicle().getLocation(), 5, 5, 5)) {
|
for (Entity ent : e.getVehicle().getLocation().getWorld().getNearbyEntities(e.getVehicle().getLocation(), 5, 5, 5)) {
|
||||||
if (ent instanceof Player) {
|
if (ent instanceof Player) {
|
||||||
((Player) ent).updateInventory();
|
((Player) ent).updateInventory();
|
||||||
User.getInstance(ent).sendMessage("limits.hit-limit", "[material]",
|
User.getInstance(ent).sendMessage("entity-limits.hit-limit", "[entity]",
|
||||||
Util.prettifyText(e.getVehicle().getType().toString())
|
Util.prettifyText(e.getVehicle().getType().toString())
|
||||||
,"[number]", String.valueOf(addon.getSettings().getLimits().get(e.getVehicle().getType())));
|
,"[number]", String.valueOf(addon.getSettings().getLimits().get(e.getVehicle().getType())));
|
||||||
}
|
}
|
||||||
|
@ -116,7 +116,7 @@ public class EntityLimitListener implements Listener {
|
||||||
if (!e.getSpawnReason().equals(SpawnReason.SPAWNER)) {
|
if (!e.getSpawnReason().equals(SpawnReason.SPAWNER)) {
|
||||||
for (Entity ent : e.getLocation().getWorld().getNearbyEntities(e.getLocation(), 5, 5, 5)) {
|
for (Entity ent : e.getLocation().getWorld().getNearbyEntities(e.getLocation(), 5, 5, 5)) {
|
||||||
if (ent instanceof Player) {
|
if (ent instanceof Player) {
|
||||||
User.getInstance(ent).sendMessage("limits.hit-limit", "[material]",
|
User.getInstance(ent).sendMessage("entity-limits.hit-limit", "[entity]",
|
||||||
Util.prettifyText(e.getEntityType().toString()),
|
Util.prettifyText(e.getEntityType().toString()),
|
||||||
"[number]", String.valueOf(addon.getSettings().getLimits().get(e.getEntityType())));
|
"[number]", String.valueOf(addon.getSettings().getLimits().get(e.getEntityType())));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue