mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-25 01:49:49 -05:00
Fix a bug for customNameVisible doesn't work
Former-commit-id: e14620c73e7c75618ecdd9a63fc3e6110951185d
This commit is contained in:
1 parent
e43a10133e
commit
acd33da53c
2 files changed
+6
-6
No files matched your search
@@ -19,8 +19,6 @@
|
||||
|
||||
package org.maxgamer.quickshop.Shop;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.UUID;
|
||||
import lombok.ToString;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
@@ -28,15 +26,16 @@ import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Item;
|
||||
import org.bukkit.event.player.PlayerTeleportEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.util.Vector;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.maxgamer.quickshop.Event.ShopDisplayItemDespawnEvent;
|
||||
import org.maxgamer.quickshop.Event.ShopDisplayItemSpawnEvent;
|
||||
import org.maxgamer.quickshop.QuickShop;
|
||||
import org.maxgamer.quickshop.Util.Util;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.UUID;
|
||||
|
||||
@ToString
|
||||
public class RealDisplayItem extends DisplayItem {
|
||||
|
||||
@@ -181,12 +180,13 @@ public class RealDisplayItem extends DisplayItem {
|
||||
if (plugin.getConfig().getBoolean("shop.display-item-use-name")) {
|
||||
item.setCustomName(Util.getItemStackName(this.originalItemStack));
|
||||
item.setCustomNameVisible(true);
|
||||
} else {
|
||||
item.setCustomNameVisible(false);
|
||||
}
|
||||
item.setPickupDelay(Integer.MAX_VALUE);
|
||||
item.setSilent(true);
|
||||
item.setPortalCooldown(Integer.MAX_VALUE);
|
||||
item.setVelocity(new Vector(0, 0.1, 0));
|
||||
item.setCustomNameVisible(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user