forked from Minecraft/QoL
Added `/marker remove` and made the icon a config option (#43)
parent
e75d8efdfc
commit
6a746d5702
|
@ -45,4 +45,4 @@ Alias ``/names`` and ``/name``
|
|||
|
||||
``/dynmaplink [<map>] [<zoom>]`` Get a link to Dynmap with your current location. Optionally choose the map (flat, surface, etc.) and zoom level.
|
||||
|
||||
``/marker`` Creates a marker on the dynmap at the players current location.
|
||||
``/marker <set|remove>`` Creates or removes a marker on the dynmap at the players current location.
|
||||
|
|
|
@ -60,3 +60,7 @@ World View Distance Override
|
|||
Paper has removed this feature in ``1.14.x`` and so it has been disabled in QoL until it is re-implemented by Paper.
|
||||
|
||||
Each world can have its own view distance. View distances of each world can be set in the config file. If no view distance is set, the view distance defaults to the one in server.properties.
|
||||
|
||||
QoL Dynmap Markers
|
||||
------------------
|
||||
QoL Markers are placed on their own layer hidden by default. A player with permission can have one marker. When a player loses the `qol.marker` permission, their marker is removed. The icon of the marker can be set in the `dynmap.marker_icon` config option
|
|
@ -26,7 +26,7 @@ public class QoL extends JavaPlugin {
|
|||
|
||||
static private final String qolMarkerSetName = "qolMarkerSet";
|
||||
static private final String qolMarkerSetLabel = "QoL Markers";
|
||||
static private final String qolMarkerIcon = "blueflag";
|
||||
private String qolMarkerIcon = null;
|
||||
|
||||
private static QoL instance;
|
||||
private IEssentials essentials = null;
|
||||
|
@ -230,6 +230,8 @@ public class QoL extends JavaPlugin {
|
|||
|
||||
viewDistances.put(worldName, viewDistance);
|
||||
}
|
||||
|
||||
qolMarkerIcon = config.getString("dynmap.marker_icon", "blueflag");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
|
||||
package xyz.etztech.qol.commands;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
@ -29,9 +30,23 @@ public class MarkerCommand implements CommandExecutor {
|
|||
return true;
|
||||
}
|
||||
|
||||
if (args.length < 1) {
|
||||
EtzTechUtil.sms(commandSender, ChatColor.RED + "/marker set");
|
||||
EtzTechUtil.sms(commandSender, ChatColor.RED + "/marker remove");
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
String action = args[0].toLowerCase();
|
||||
if (action.equals("set")) {
|
||||
plugin.createMarkerAtPlayer((Player) commandSender);
|
||||
EtzTechUtil.sms(commandSender, ChatColor.GREEN + "Location Marker Created!");
|
||||
}
|
||||
else if (action.equals("remove")) {
|
||||
plugin.getPlayerMarker((Player)commandSender).deleteMarker();
|
||||
EtzTechUtil.sms(commandSender, ChatColor.GREEN + "Location Marker Removed!");
|
||||
}
|
||||
}
|
||||
|
||||
EtzTechUtil.sms(commandSender, "Location Marker Created!");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -103,6 +103,7 @@ spec-confirm:
|
|||
# Dynmap link
|
||||
# Leave url blank to disable
|
||||
dynmap:
|
||||
marker_icon: "blueflag"
|
||||
url: ""
|
||||
defaults:
|
||||
map: "surface"
|
||||
|
|
Loading…
Reference in New Issue