1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00
This commit is contained in:
TheBusyBiscuit 2020-08-09 11:41:15 +02:00
parent 66f4c48b4b
commit 485a80f6ef
2 changed files with 9 additions and 0 deletions

View File

@ -58,6 +58,7 @@
* Fixed #2168 * Fixed #2168
* Fixed #2203 * Fixed #2203
* Fixed #2205 * Fixed #2205
* Fixed #2209
## Release Candidate 15 (01 Aug 2020) ## Release Candidate 15 (01 Aug 2020)

View File

@ -283,6 +283,14 @@ public class GPSNetwork {
if (!event.isCancelled()) { if (!event.isCancelled()) {
String id = ChatColor.stripColor(ChatColors.color(event.getName())).toUpperCase(Locale.ROOT).replace(' ', '_'); String id = ChatColor.stripColor(ChatColors.color(event.getName())).toUpperCase(Locale.ROOT).replace(' ', '_');
for (Waypoint wp : profile.getWaypoints()) {
if (wp.getId().equals(id)) {
SlimefunPlugin.getLocalization().sendMessage(p, "gps.waypoint.duplicate", true, msg -> msg.replace("%waypoint%", event.getName()));
return;
}
}
profile.addWaypoint(new Waypoint(profile, id, event.getLocation(), event.getName())); profile.addWaypoint(new Waypoint(profile, id, event.getLocation(), event.getName()));
p.playSound(p.getLocation(), Sound.BLOCK_NOTE_BLOCK_PLING, 1F, 1F); p.playSound(p.getLocation(), Sound.BLOCK_NOTE_BLOCK_PLING, 1F, 1F);