Remove redundant setContents() calls from class chest handlers.

Before, these redundant calls didn't really do anything. Now they mess everything up, because setContents() doesn't set inventory contents only, but the entire inventory instead, because that's so super useful. Well done, boys!

#notsalty
This commit is contained in:
garbagemule authored and Andreas Troelsen committed 2016-12-29 17:55:46 +01:00
1 parent 93ce8b9667
commit 558681a2f2
2 files changed
-2

No files matched your search

@@ -1103,7 +1103,6 @@ public class ArenaListener
contents = newContents; contents = newContents;
} }
arena.assignClassGiveInv(p, className, contents); arena.assignClassGiveInv(p, className, contents);
p.getInventory().setContents(contents);
Messenger.tell(p, Msg.LOBBY_CLASS_PICKED, TextUtils.camelCase(className)); Messenger.tell(p, Msg.LOBBY_CLASS_PICKED, TextUtils.camelCase(className));
if (price > 0D) { if (price > 0D) {
Messenger.tell(p, Msg.LOBBY_CLASS_PRICE, plugin.economyFormat(price)); Messenger.tell(p, Msg.LOBBY_CLASS_PRICE, plugin.economyFormat(price));
@@ -101,7 +101,6 @@ public class PickClassCommand implements Command
contents = newContents; contents = newContents;
} }
arena.assignClassGiveInv(p, lowercase, contents); arena.assignClassGiveInv(p, lowercase, contents);
p.getInventory().setContents(contents);
Messenger.tell(p, Msg.LOBBY_CLASS_PICKED, TextUtils.camelCase(lowercase)); Messenger.tell(p, Msg.LOBBY_CLASS_PICKED, TextUtils.camelCase(lowercase));
if (price > 0D) { if (price > 0D) {
Messenger.tell(p, Msg.LOBBY_CLASS_PRICE, am.getPlugin().economyFormat(price)); Messenger.tell(p, Msg.LOBBY_CLASS_PRICE, am.getPlugin().economyFormat(price));