mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-19 19:25:48 +00:00
Fixes #2209
This commit is contained in:
parent
66f4c48b4b
commit
485a80f6ef
@ -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)
|
||||||
|
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user