From e9cbda853549a2541db72bece473555493c3c14b Mon Sep 17 00:00:00 2001 From: Morphan1 Date: Mon, 23 Jan 2017 19:27:43 -0500 Subject: [PATCH 1/3] Allow offline players to be made op --- .../src/main/java/net/aufdemrand/denizen/objects/dPlayer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/src/main/java/net/aufdemrand/denizen/objects/dPlayer.java b/plugin/src/main/java/net/aufdemrand/denizen/objects/dPlayer.java index 9c7ff9ce8a..efdbe65a6b 100644 --- a/plugin/src/main/java/net/aufdemrand/denizen/objects/dPlayer.java +++ b/plugin/src/main/java/net/aufdemrand/denizen/objects/dPlayer.java @@ -3037,7 +3037,7 @@ else if (split.length > 1) { // // --> if (mechanism.matches("is_op") && mechanism.requireBoolean()) { - getPlayerEntity().setOp(mechanism.getValue().asBoolean()); + getOfflinePlayer().setOp(mechanism.getValue().asBoolean()); } // <--[mechanism] From 49bf4691c30266279ee1bf086f3b00b0d2e31907 Mon Sep 17 00:00:00 2001 From: mcmonkey4eva Date: Tue, 24 Jan 2017 04:58:49 -0800 Subject: [PATCH 2/3] add some null checks where they BELONG! *inchorent mumbling about smurfs* --- .../denizen/scripts/commands/entity/WalkCommand.java | 3 +++ .../scripts/commands/entity/WalkCommandCitizensEvents.java | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/plugin/src/main/java/net/aufdemrand/denizen/scripts/commands/entity/WalkCommand.java b/plugin/src/main/java/net/aufdemrand/denizen/scripts/commands/entity/WalkCommand.java index e85256701a..1d1bff52ae 100644 --- a/plugin/src/main/java/net/aufdemrand/denizen/scripts/commands/entity/WalkCommand.java +++ b/plugin/src/main/java/net/aufdemrand/denizen/scripts/commands/entity/WalkCommand.java @@ -210,6 +210,9 @@ public void checkHeld(dEntity entity) { for (int i = 0; i < held.size(); i++) { ScriptEntry entry = held.get(i); List waitForEntities = (List) entry.getObject("entities"); + if (waitForEntities == null) { + continue; + } waitForEntities.remove(entity); if (waitForEntities.isEmpty()) { if (!entry.hasObject("tally") || ((List) entry.getObject("tally")).isEmpty()) { diff --git a/plugin/src/main/java/net/aufdemrand/denizen/scripts/commands/entity/WalkCommandCitizensEvents.java b/plugin/src/main/java/net/aufdemrand/denizen/scripts/commands/entity/WalkCommandCitizensEvents.java index 4278677e57..d5f5062daf 100644 --- a/plugin/src/main/java/net/aufdemrand/denizen/scripts/commands/entity/WalkCommandCitizensEvents.java +++ b/plugin/src/main/java/net/aufdemrand/denizen/scripts/commands/entity/WalkCommandCitizensEvents.java @@ -56,6 +56,11 @@ public void checkHeld(NavigationEvent e) { // Get all NPCs associated with the entry. They must all // finish navigation before the entry can be let go List tally = (List) entry.getObject("tally"); + + if (tally == null) { + continue; + } + for (int x = 0; x < tally.size(); x++) { if (!tally.get(x).isSpawned()) { tally.remove(x--); From 93bedf89955fdb71ad5a4c082f36110280c1be4c Mon Sep 17 00:00:00 2001 From: Mwthorn Date: Mon, 30 Jan 2017 16:39:50 +0100 Subject: [PATCH 3/3] Filling in documentation (#79) * Add more description to flag command note that the description is still not fully described. * Added more usage for modifyblock command * Added description and usage for take command * better english sentences * changed links to use correct link format * Added further description and usage for give cmd Please note that the description is not fully complete. Needs more words about "Engrave" which I currently have no idea what that does. * forgot this here... in give cmd * added usage for playeffect command * changed typo from exact to exactly. * Changed to fit effect name correctly --- .../commands/BukkitCommandRegistry.java | 52 ++++++++++++++++--- 1 file changed, 46 insertions(+), 6 deletions(-) diff --git a/plugin/src/main/java/net/aufdemrand/denizen/scripts/commands/BukkitCommandRegistry.java b/plugin/src/main/java/net/aufdemrand/denizen/scripts/commands/BukkitCommandRegistry.java index c4b9aa1b7d..dd41ddcc40 100644 --- a/plugin/src/main/java/net/aufdemrand/denizen/scripts/commands/BukkitCommandRegistry.java +++ b/plugin/src/main/java/net/aufdemrand/denizen/scripts/commands/BukkitCommandRegistry.java @@ -1460,6 +1460,9 @@ public void registerCoreMembers() { // @Description // The flag command sets or modifies custom value storage database entries connected to // each player, each NPC, each entity, and the server. + // All the flag values are stored default in "plugins/denizen/saves.yml" file. + // For an alternative way of storing values, use either yaml (See <@link command yaml>) + // or sql (See <@link command sql>) // TODO: Document Command Details // // @Tags @@ -1615,6 +1618,11 @@ public void registerCoreMembers() { // // @Description // Gives the linked player or inventory any form of giveable object, including items, xp, or money. + // If the player's inventory if full, the item will be dropped at the inventory location. + // Specifying a slot will give the player the item to that slot. + // If an item is already in that slot, the item will not be given + // unless they are exactly the same items, then it will stack. + // If an economy is registered, specifying money instead of a item will give money to the player's economy. // TODO: Document Command Details // // @Tags @@ -1630,7 +1638,11 @@ public void registerCoreMembers() { // // @Usage // Use to give an item to the player. - // - give i@iron_sword quantity:1 + // - give i@iron_sword + // + // @Usage + // Use to give an item and place it in a specific slot if possible. + // - give WATCH slot:5 // --> registerCoreMember(GiveCommand.class, "GIVE", "give [money/xp/|...] (qty:<#>) (engrave) (to:) (slot:<#>)", 1); @@ -2425,7 +2437,12 @@ public void registerCoreMembers() { // - modifyblock cu@| li@stone|dirt li@25|25 // // @Usage - // TODO: Document Command Details + // Use to clear the area around the player and drop their respective items. + // - modifyblock air radius:5 naturally delayed + // + // @Usage + // Use to modify the ground beneath the player's feet. + // - modifyblock cu@| WOOL,14 // --> registerCoreMember(ModifyBlockCommand.class, "MODIFYBLOCK", "modifyblock [|...//] [|...] (radius:<#>) (height:<#>) (depth:<#>) (no_physics/naturally) (delayed) (