Remove duplicate remove code

Former-commit-id: 4df1c4e36204ce46b8e472e956c0ba8123cd30a7
This commit is contained in:
sandtechnology committed 2020-03-20 23:05:34 +08:00
1 parent 1163d1a196
commit 9d58065068
2 files changed
+3 -5

No files matched your search

@@ -335,10 +335,6 @@ public class ContainerShop implements Shop {
if (isLoaded) {
this.onUnload();
}
// Delete the display item
if (this.getDisplayItem() != null) {
this.getDisplayItem().remove();
}
// Delete the signs around it
for (Sign s : this.getSigns()) {
s.getBlock().setType(Material.AIR);
@@ -236,7 +236,9 @@ public class VirtualDisplayItem extends DisplayItem {
private void unload() {
packetSenders.clear();
protocolManager.removePacketListener(packetAdapter);
if(packetAdapter!=null) {
protocolManager.removePacketListener(packetAdapter);
}
if (asyncSendingTask != null && !asyncSendingTask.isCancelled()) {
asyncSendingTask.cancel();
}