mirror of
https://github.com/webbukkit/dynmap.git
synced 2025-01-12 10:50:37 +01:00
only OPs can use fullrender. added response to chat for
hide/show/fillrender commands.
This commit is contained in:
parent
ad07d68d7e
commit
e15514291b
@ -35,8 +35,10 @@ public class DynmapPlayerListener extends PlayerListener {
|
|||||||
mgr.touch(player.getLocation());
|
mgr.touch(player.getLocation());
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
} else if (split[1].equals("hide")) {
|
} else if (split[1].equals("hide")) {
|
||||||
|
Player player = event.getPlayer();
|
||||||
|
player.sendMessage("You are now hidden on Dynmap.");
|
||||||
if (split.length == 2) {
|
if (split.length == 2) {
|
||||||
playerList.hide(event.getPlayer().getName());
|
playerList.hide(player.getName());
|
||||||
} else {
|
} else {
|
||||||
for (int i = 2; i < split.length; i++) {
|
for (int i = 2; i < split.length; i++) {
|
||||||
playerList.hide(split[i]);
|
playerList.hide(split[i]);
|
||||||
@ -44,8 +46,10 @@ public class DynmapPlayerListener extends PlayerListener {
|
|||||||
}
|
}
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
} else if (split[1].equals("show")) {
|
} else if (split[1].equals("show")) {
|
||||||
|
Player player = event.getPlayer();
|
||||||
|
player.sendMessage("You are now visible on Dynmap.");
|
||||||
if (split.length == 2) {
|
if (split.length == 2) {
|
||||||
playerList.show(event.getPlayer().getName());
|
playerList.show(player.getName());
|
||||||
} else {
|
} else {
|
||||||
for (int i = 2; i < split.length; i++) {
|
for (int i = 2; i < split.length; i++) {
|
||||||
playerList.show(split[i]);
|
playerList.show(split[i]);
|
||||||
@ -54,8 +58,13 @@ public class DynmapPlayerListener extends PlayerListener {
|
|||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
} else if (split[1].equals("fullrender")) {
|
} else if (split[1].equals("fullrender")) {
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
mgr.renderFullWorld(player.getLocation());
|
if (player.isOp() == true) {
|
||||||
event.setCancelled(true);
|
player.sendMessage("Starting fullrender on this world...");
|
||||||
|
mgr.renderFullWorld(player.getLocation());
|
||||||
|
event.setCancelled(true);
|
||||||
|
} else {
|
||||||
|
player.sendMessage("Only OPs are allowed to use this command!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user