mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
Updated for b104.
This commit is contained in:
parent
c1a5fc8782
commit
1f7b39b8e3
@ -203,8 +203,8 @@ public class WorldEdit extends Plugin {
|
|||||||
public boolean onBlockCreate(Player player, Block blockPlaced,
|
public boolean onBlockCreate(Player player, Block blockPlaced,
|
||||||
Block blockClicked, int itemInHand) {
|
Block blockClicked, int itemInHand) {
|
||||||
if (itemInHand == 271) { // Wooden axe
|
if (itemInHand == 271) { // Wooden axe
|
||||||
if (!etc.getInstance().canUseCommand(player.getName(), "/editpos1")
|
if (!player.canUseCommand("/editpos1")
|
||||||
|| !etc.getInstance().canUseCommand(player.getName(), "/editpos2")) {
|
|| !player.canUseCommand("/editpos2")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -254,13 +254,13 @@ public class WorldEdit extends Plugin {
|
|||||||
public boolean onCommand(Player player, String[] split) {
|
public boolean onCommand(Player player, String[] split) {
|
||||||
try {
|
try {
|
||||||
if (commands.containsKey(split[0])) {
|
if (commands.containsKey(split[0])) {
|
||||||
if (etc.getInstance().canUseCommand(player.getName(), split[0])) {
|
if (player.canUseCommand(split[0])) {
|
||||||
return handleEditCommand(player, split);
|
return handleEditCommand(player, split);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// See if there is a script by the same name
|
// See if there is a script by the same name
|
||||||
if (mapScriptCommands) {
|
if (mapScriptCommands) {
|
||||||
if (etc.getInstance().canUseCommand(player.getName(), "/editscript")) {
|
if (player.canUseCommand("/editscript")) {
|
||||||
String filename = split[0].substring(1) + ".js";
|
String filename = split[0].substring(1) + ".js";
|
||||||
String[] args = new String[split.length - 1];
|
String[] args = new String[split.length - 1];
|
||||||
System.arraycopy(split, 1, args, 0, split.length - 1);
|
System.arraycopy(split, 1, args, 0, split.length - 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user