Skip to content

Commit

Permalink
Fix inventory titles, fixes #1224
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Nov 11, 2015
1 parent 934ea5a commit 2f35758
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Expand Up @@ -1979,8 +1979,8 @@ public void registerCoreMembers() {
// - pause activity 1m
// @Usage
// Use to pause an NPC's waypoint navigation and then resume it.
// - pause navigation
// - resume navigation
// - pause waypoints
// - resume waypoints
// -->
if (Depends.citizens != null)
registerCoreMember(PauseCommand.class,
Expand Down
Expand Up @@ -73,8 +73,9 @@ public void execute(final ScriptEntry scriptEntry) throws CommandExecutionExcept
}
else if (holderObject instanceof dLocation) {
holderLoc = ((dLocation) scriptEntry.getObject("holder"));
if (holderLoc.getBlock().getType() == Material.FENCE || holderLoc.getBlock().getType() == Material.NETHER_FENCE)
if (holderLoc.getBlock().getType() == Material.FENCE || holderLoc.getBlock().getType() == Material.NETHER_FENCE) {
Holder = holderLoc.getWorld().spawn(holderLoc, LeashHitch.class);
}
else {
dB.echoError(scriptEntry.getResidingQueue(), "Bad holder location specified - only fences are permitted!");
return;
Expand Down
Expand Up @@ -93,9 +93,13 @@ public dInventory getInventoryFrom(dPlayer player, dNPC npc) {
if (InventoryType.valueOf(getString("INVENTORY").toUpperCase()) != null) {
inventory = new dInventory(InventoryType.valueOf(getString("INVENTORY").toUpperCase()));
inventory.setIdentifiers("script", getName());
if (contains("TITLE")) {
inventory.setTitle(TagManager.tag(getString("TITLE"), context));
}
}
else {
dB.echoError("Invalid inventory type specified. Assuming \"CHEST\"");
// TODO: Maybe actually construct a default chest inventory at this point?
}
}
int size = 0;
Expand Down

0 comments on commit 2f35758

Please sign in to comment.