Skip to content

Commit

Permalink
Removed item wand functionality
Browse files Browse the repository at this point in the history
Anyone who can use it has to be able to run the command anyway. If they can run the command, they can use tab completion to automatically fill in anyone online's name. There's no need to keep around a bunch of deprecated code for a function I sincerely doubt anyone actually uses.
  • Loading branch information
Jikoo committed Mar 1, 2016
1 parent 17b0cb6 commit 3549431
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 129 deletions.
6 changes: 0 additions & 6 deletions src/com/lishid/openinv/OpenInv.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import com.lishid.openinv.commands.OpenInvPluginCommand;
import com.lishid.openinv.commands.SearchInvPluginCommand;
import com.lishid.openinv.commands.SilentChestPluginCommand;
import com.lishid.openinv.commands.ToggleOpenInvPluginCommand;
import com.lishid.openinv.internal.IAnySilentChest;
import com.lishid.openinv.internal.IInventoryAccess;
import com.lishid.openinv.internal.IPlayerDataManager;
Expand Down Expand Up @@ -79,21 +78,16 @@ public void onEnable() {
FileConfiguration config = getConfig();
config.set("NotifySilentChest", config.getBoolean("NotifySilentChest", true));
config.set("NotifyAnyChest", config.getBoolean("NotifyAnyChest", true));
config.set("ItemOpenInvItemID", config.getInt("ItemOpenInvItemID", 280));
config.addDefault("ItemOpenInvItemID", 280);
config.addDefault("CheckForUpdates", true);
config.addDefault("NotifySilentChest", true);
config.addDefault("NotifyAnyChest", true);
config.options().copyDefaults(true);
saveConfig();

pm.registerEvents(new OpenInvPlayerListener(), this);
pm.registerEvents(new OpenInvEntityListener(), this);
pm.registerEvents(new OpenInvInventoryListener(), this);

getCommand("openinv").setExecutor(new OpenInvPluginCommand(this));
getCommand("searchinv").setExecutor(new SearchInvPluginCommand());
getCommand("toggleopeninv").setExecutor(new ToggleOpenInvPluginCommand());
getCommand("silentchest").setExecutor(new SilentChestPluginCommand(this));
getCommand("anychest").setExecutor(new AnyChestPluginCommand(this));
getCommand("openender").setExecutor(new OpenEnderPluginCommand(this));
Expand Down
52 changes: 0 additions & 52 deletions src/com/lishid/openinv/OpenInvEntityListener.java

This file was deleted.

8 changes: 0 additions & 8 deletions src/com/lishid/openinv/OpenInvPlayerListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,5 @@ public void onPlayerInteract(PlayerInteractEvent event) {
ex.printStackTrace();
}
}

if (event.getAction() == Action.RIGHT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_BLOCK) {
if (!(player.getItemInHand().getType().getId() == OpenInv.GetItemOpenInvItem()) || (!OpenInv.GetPlayerItemOpenInvStatus(player.getName())) || !OpenInv.hasPermission(player, Permissions.PERM_OPENINV)) {
return;
}

player.performCommand("openinv");
}
}
}
56 changes: 0 additions & 56 deletions src/com/lishid/openinv/commands/ToggleOpenInvPluginCommand.java

This file was deleted.

8 changes: 1 addition & 7 deletions src/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: OpenInv
main: com.lishid.openinv.OpenInv
version: 2.2.10
version: 2.3.0
author: lishid
authors: [Jikoo]
description: >
Expand All @@ -25,12 +25,6 @@ commands:
permission: OpenInv.search
usage: |
/<command> <Item> [MinAmount] - Item can be the Item ID or the CraftBukkit Item Name, MinAmount is the minimum amount to be considered.
toggleopeninv:
aliases: [toi, toggleoi, toggleinv]
description: Toggle item openinv function
permission: OpenInv.openinv
usage: |
/<command> [Check] - Checks whether item openinv is enabled
silentchest:
aliases: [sc, silent]
description: Toggle silent chest function, which hides the animation of a chest when opened or closed, and suppresses the sound.
Expand Down

0 comments on commit 3549431

Please sign in to comment.