Adding distance in the message
This commit is contained in:
parent
4d3838caa7
commit
aa8d8a3028
3 changed files with 3 additions and 2 deletions
|
@ -15,4 +15,4 @@ commands:
|
||||||
description: A set of commands designed for R and D
|
description: A set of commands designed for R and D
|
||||||
|
|
||||||
softdepend: [Factions]
|
softdepend: [Factions]
|
||||||
depend: [ButtonCore]
|
depend: [ChromaCore]
|
|
@ -56,7 +56,7 @@ public class TownyFactionsComponent extends Component<ButtonPresents> implements
|
||||||
int distance = max * amount;
|
int distance = max * amount;
|
||||||
if (distance().get() >= distance) {
|
if (distance().get() >= distance) {
|
||||||
event.setCancelled(true);
|
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.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,3 +15,4 @@ commands:
|
||||||
description: A set of commands designed for R and D
|
description: A set of commands designed for R and D
|
||||||
|
|
||||||
softdepend: [Factions]
|
softdepend: [Factions]
|
||||||
|
depend: [ChromaCore]
|
Loading…
Reference in a new issue