mirror of
https://github.com/amalthea-mc/ShopChest.git
synced 2024-11-26 04:12:22 +00:00
Add config value to enable quality mode
This commit is contained in:
parent
cda28be3e3
commit
e9bcd2dd2f
@ -68,6 +68,9 @@ public class Config {
|
|||||||
/** Whether shops should be protected by explosions **/
|
/** Whether shops should be protected by explosions **/
|
||||||
public boolean explosion_protection;
|
public boolean explosion_protection;
|
||||||
|
|
||||||
|
/** Whether quality mode should be enabled **/
|
||||||
|
public boolean enable_quality_mode;
|
||||||
|
|
||||||
/** Whether hologram interaction should be enabled **/
|
/** Whether hologram interaction should be enabled **/
|
||||||
public boolean enable_hologram_interaction;
|
public boolean enable_hologram_interaction;
|
||||||
|
|
||||||
@ -286,6 +289,7 @@ public class Config {
|
|||||||
buy_greater_or_equal_sell = plugin.getConfig().getBoolean("buy-greater-or-equal-sell");
|
buy_greater_or_equal_sell = plugin.getConfig().getBoolean("buy-greater-or-equal-sell");
|
||||||
hopper_protection = plugin.getConfig().getBoolean("hopper-protection");
|
hopper_protection = plugin.getConfig().getBoolean("hopper-protection");
|
||||||
two_line_prices = plugin.getConfig().getBoolean("two-line-prices");
|
two_line_prices = plugin.getConfig().getBoolean("two-line-prices");
|
||||||
|
enable_quality_mode = plugin.getConfig().getBoolean("enable-quality-mode");
|
||||||
enable_hologram_interaction = plugin.getConfig().getBoolean("enable-hologram-interaction");
|
enable_hologram_interaction = plugin.getConfig().getBoolean("enable-hologram-interaction");
|
||||||
enable_debug_log = plugin.getConfig().getBoolean("enable-debug-log");
|
enable_debug_log = plugin.getConfig().getBoolean("enable-debug-log");
|
||||||
enable_worldguard_integration = plugin.getConfig().getBoolean("enable-worldguard-integration");
|
enable_worldguard_integration = plugin.getConfig().getBoolean("enable-worldguard-integration");
|
||||||
|
@ -27,6 +27,13 @@ public class HologramUpdateListener implements Listener {
|
|||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
|
||||||
public void onPlayerMove(PlayerMoveEvent e) {
|
public void onPlayerMove(PlayerMoveEvent e) {
|
||||||
|
if (!plugin.getShopChestConfig().enable_quality_mode &&
|
||||||
|
e.getFrom().getBlockX() == e.getTo().getBlockX() &&
|
||||||
|
e.getFrom().getBlockY() == e.getTo().getBlockY() &&
|
||||||
|
e.getFrom().getBlockZ() == e.getTo().getBlockZ()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
updateHolograms(e.getPlayer());
|
updateHolograms(e.getPlayer());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,6 +14,13 @@ language-file: "en_US"
|
|||||||
# Set whether the floating shop items on top of the chest should be shown
|
# Set whether the floating shop items on top of the chest should be shown
|
||||||
show-shop-items: true
|
show-shop-items: true
|
||||||
|
|
||||||
|
# Set whether quality-mode should be enabled.
|
||||||
|
# Showing and hiding holograms will look better,
|
||||||
|
# but TPS will probably decrease.
|
||||||
|
# Not recommended on servers with low performance
|
||||||
|
# or on servers with a lot of shops!
|
||||||
|
enable-quality-mode: false
|
||||||
|
|
||||||
# Set whether interaction with the hologram should be enabled.
|
# Set whether interaction with the hologram should be enabled.
|
||||||
# If set to true, a player can do the exact same thing with the
|
# If set to true, a player can do the exact same thing with the
|
||||||
# hologram, as with the chest. You can even open the chest if you
|
# hologram, as with the chest. You can even open the chest if you
|
||||||
|
Loading…
Reference in New Issue
Block a user