Adding distance in the message

This commit is contained in:
Norbi Peti 2019-08-27 02:54:28 +02:00
parent 4d3838caa7
commit aa8d8a3028
No known key found for this signature in database
GPG key ID: DBA4C4549A927E56
3 changed files with 3 additions and 2 deletions

View file

@ -15,4 +15,4 @@ commands:
description: A set of commands designed for R and D
softdepend: [Factions]
depend: [ButtonCore]
depend: [ChromaCore]

View file

@ -56,7 +56,7 @@ public class TownyFactionsComponent extends Component<ButtonPresents> implements
int distance = max * amount;
if (distance().get() >= distance) {
event.setCancelled(true);
event.getSender().sendMessage("§cYou are too close to a town!");
event.getSender().sendMessage("§cYou are too close to a town! " + distance + " chunks away, " + distance().get() + " is allowed.");
}
}
}

View file

@ -15,3 +15,4 @@ commands:
description: A set of commands designed for R and D
softdepend: [Factions]
depend: [ChromaCore]