Remove useless comments

Former-commit-id: 5bb21a5ea58d1d806eb555b588b5c94bb1a2fd8f
This commit is contained in:
Ghost_chu committed 2019-12-13 16:38:29 +08:00
1 parent cf25db42a0
commit bb29a49e5a
5 files changed
-57

No files matched your search

@@ -29,7 +29,6 @@ import org.maxgamer.quickshop.Util.Util;
public class PermissionManager {
private QuickShop plugin;
private PermissionProvider provider;
//private PermissionProviderType providerType;
/**
* The manager to call permission providers
@@ -38,32 +37,7 @@ public class PermissionManager {
*/
public PermissionManager(QuickShop plugin) {
this.plugin = plugin;
// try {
// this.providerType = PermissionProviderType.fromID(plugin.getConfig().getInt("permission-type"));
// } catch (IllegalArgumentException e) {
// plugin.getLogger().warning("Falling back to Bukkit permission provider...");
// this.providerType = PermissionProviderType.BUKKIT;
// }
// try {
// switch (providerType) {
// case BUKKIT:
provider = new BukkitPermsProvider();
// break;
// case VAULT:
// provider = new VaultPermissionProvider();
// break;
// default:
// provider = new BukkitPermsProvider();
// break;
// }
// } catch (ProviderIsEmptyException empty) {
// plugin.getLogger().warning("Provider " + providerType.name() + " doesn't work, falling back to BUKKIT.");
// provider = new BukkitPermsProvider();
// } catch (Throwable th) {
// th.printStackTrace();
// plugin.getLogger().warning("Provider " + providerType.name() + " failed loading, falling back to BUKKIT.");
// provider = new BukkitPermsProvider();
// }
plugin.getLogger().info("Selected permission provider: " + provider.getName());
}
@@ -557,11 +557,6 @@ public class QuickShop extends JavaPlugin {
getLogger().severe("FATAL: Old QuickShop is installed, You must remove old quickshop jar from plugins folder!");
throw new RuntimeException("FATAL: Old QuickShop is installed, You must remove old quickshop jar from plugins folder!");
}
// if (!Util.isClassAvailable("org.apache.http.impl.client.HttpClients")) {
// getLogger()
// .severe("FATAL: Broken QuickShop build, please download from SpigotMC not Github if you didn't know should download which one.");
// throw new RuntimeException("Broken QuickShop build, please download from SpigotMC not Github if you didn't know should download which one.");
// }
try {
getServer().spigot();
} catch (Throwable e) {
@@ -40,11 +40,6 @@ import java.util.Objects;
*/
public interface DisplayItem {
// /**
// * constant literal to check if item is quickshop display item
// */
// static final String QUICKSHOP_DISPLAY_ITEM = "quickshop display item";
/**
* Check the itemStack is contains protect flag.
*
@@ -61,11 +56,6 @@ public interface DisplayItem {
return false;
}
ItemMeta iMeta = itemStack.getItemMeta();
// if (iMeta.hasDisplayName()) {
// if (iMeta.getDisplayName().toLowerCase().contains(QUICKSHOP_DISPLAY_ITEM)) {
// return true;
// }
// }
if (!Objects.requireNonNull(iMeta).hasLore()) {
return false;
}
@@ -589,17 +589,6 @@ public class ShopManager {
* @return True if they're allowed to place a shop there.
*/
public boolean canBuildShop(@NotNull Player p, @NotNull Block b, @NotNull BlockFace bf) {
RegisteredListener openInvRegisteredListener = null; // added for compatibility reasons with OpenInv - see https://github.com/KaiKikuchi/QuickShop/issues/139
// try {
// if (plugin.openInvPlugin != null) {
// for (RegisteredListener listener : PlayerInteractEvent.getHandlerList().getRegisteredListeners()) {
// if (listener.getPlugin().getName().equals(plugin.openInvPlugin.getName())) {
// openInvRegisteredListener = listener;
// PlayerInteractEvent.getHandlerList().unregister(listener);
// break;
// }
// }
// }
try {
plugin.getCompatibilityTool().toggleProtectionListeners(false, p);
@@ -626,7 +615,6 @@ public class ShopManager {
int max = plugin.getShopLimit(p);
if (owned + 1 > max) {
//p.sendMessage(ChatColor.RED + "You have already created a maximum of " + owned + "/" + max + " shops!");
p.sendMessage(MsgUtil.getMessage("reached-maximum-can-create", p, String.valueOf(owned), String.valueOf(max)));
return false;
}
@@ -641,9 +629,6 @@ public class ShopManager {
return false;
}
} finally {
// if (plugin.openInvPlugin != null && openInvRegisteredListener != null) {
// PlayerInteractEvent.getHandlerList().register(openInvRegisteredListener);
// }
plugin.getCompatibilityTool().toggleProtectionListeners(true, p);
}
@@ -38,7 +38,6 @@ import org.jetbrains.annotations.NotNull;
*/
public class ChatSheetPrinter {
final ChatColor chatColor = ChatColor.DARK_PURPLE;
//StringBuffer buffer = new StringBuffer();
private CommandSender p;
public void printCenterLine(@NotNull String text) {