mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-24 17:39:52 -05:00
Add support for some DropItem holo name plugin
Former-commit-id: 9f479fad2a2a123aa08fd183105e7fd0484565b5 [formerly 98432ac28a65eb3ee0e8d88e489aa901e8ec7e25] Former-commit-id: 9ae094276a8e23343d28d1ab1b046e68469375c7
This commit is contained in:
1 parent
224a7265d3
commit
c97226e619
4 files changed
+16
-10
No files matched your search
@@ -1,7 +1,5 @@
|
||||
package org.maxgamer.quickshop;
|
||||
|
||||
import com.comphenix.protocol.ProtocolLibrary;
|
||||
import com.comphenix.protocol.ProtocolManager;
|
||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
@@ -94,7 +92,6 @@ public class QuickShop extends JavaPlugin {
|
||||
// private Metrics metrics;
|
||||
|
||||
MultiverseCore mPlugin = null;
|
||||
ProtocolManager protocolManager = null;
|
||||
private int displayItemCheckTicks;
|
||||
private boolean noopDisable;
|
||||
/** The plugin metrics from Hidendra */
|
||||
@@ -107,9 +104,6 @@ public class QuickShop extends JavaPlugin {
|
||||
}
|
||||
return max;
|
||||
}
|
||||
public ProtocolManager getProtocolManager(){
|
||||
return this.protocolManager;
|
||||
}
|
||||
|
||||
@SuppressWarnings("resource")
|
||||
public void onEnable() {
|
||||
@@ -154,7 +148,7 @@ public class QuickShop extends JavaPlugin {
|
||||
getLogger().info("Successfully loaded MultiverseCore support!");
|
||||
}
|
||||
|
||||
int CurrentConfigVersion = 4;
|
||||
int CurrentConfigVersion = 6;
|
||||
|
||||
if (getConfig().getInt("config-version") != CurrentConfigVersion) {
|
||||
if (!updateConfig(getConfig().getInt("config-version"), CurrentConfigVersion)) {
|
||||
@@ -763,6 +757,11 @@ public class QuickShop extends JavaPlugin {
|
||||
getConfig().set("config-version", 5);
|
||||
selectedVersion = 5;
|
||||
}
|
||||
if (selectedVersion == 5) {
|
||||
getConfig().set("shop.display-item-use-name", true);
|
||||
getConfig().set("config-version", 6);
|
||||
selectedVersion = 6;
|
||||
}
|
||||
}
|
||||
|
||||
/** Reloads QuickShops config */
|
||||
|
||||
@@ -204,9 +204,13 @@ public class DisplayItem {
|
||||
}
|
||||
public void safeGuard(Item item) {
|
||||
item.setPickupDelay(Integer.MAX_VALUE);
|
||||
item.setCustomName("QuickShop");
|
||||
ItemMeta iMeta = item.getItemStack().getItemMeta();
|
||||
iMeta.setDisplayName("QuickShop");
|
||||
|
||||
if(plugin.getConfig().getBoolean("shop.display-item-use-name")) {
|
||||
item.setCustomName("QuickShop");
|
||||
iMeta.setDisplayName("QuickShop");
|
||||
}
|
||||
|
||||
java.util.List<String> lore = new ArrayList<String>();
|
||||
lore.add("QuickShop DisplayItem");
|
||||
iMeta.setLore(lore);
|
||||
|
||||
Reference in new issue
Block a user