mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-26 17:05:01 +00:00
Guess I had to modify LibsDisguises after all
This commit is contained in:
parent
c333a6ee39
commit
d74eeec113
17
pom.xml
17
pom.xml
@ -90,11 +90,6 @@
|
||||
<url>http://maven.sk89q.com/repo/</url>
|
||||
</repository>
|
||||
|
||||
<repository>
|
||||
<id>CodeMC</id>
|
||||
<url>https://repo.codemc.org/repository/maven-public</url>
|
||||
</repository>
|
||||
|
||||
<repository>
|
||||
<id>papermc</id>
|
||||
<url>https://papermc.io/repo/repository/maven-public/</url>
|
||||
@ -150,9 +145,9 @@
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.libraryaddict</groupId>
|
||||
<artifactId>LibsDisguises</artifactId>
|
||||
<version>31672fce7b</version>
|
||||
<groupId>com.github.TFPatches</groupId>
|
||||
<artifactId>TF-LibsDisguises</artifactId>
|
||||
<version>0cfa32159a</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@ -236,6 +231,12 @@
|
||||
<version>3.12.1.GA</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.10</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
@ -4,6 +4,7 @@ import me.libraryaddict.disguise.DisguiseAPI;
|
||||
import me.libraryaddict.disguise.LibsDisguises;
|
||||
import me.totalfreedom.totalfreedommod.FreedomService;
|
||||
import me.totalfreedom.totalfreedommod.util.FLog;
|
||||
import me.libraryaddict.disguise.BlockedDisguises;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
@ -101,19 +102,12 @@ public class LibsDisguisesBridge extends FreedomService
|
||||
return;
|
||||
}
|
||||
|
||||
if (state)
|
||||
{
|
||||
server.getPluginManager().disablePlugin(libsDisguises);
|
||||
}
|
||||
else
|
||||
{
|
||||
server.getPluginManager().disablePlugin(libsDisguises);
|
||||
}
|
||||
BlockedDisguises.disabled = !state;
|
||||
}
|
||||
|
||||
public boolean isDisguisesEnabled()
|
||||
{
|
||||
return !getLibsDisguisesPlugin().isEnabled();
|
||||
return !BlockedDisguises.disabled;
|
||||
}
|
||||
|
||||
public boolean isEnabled()
|
||||
|
@ -66,7 +66,7 @@ public class PermissionManager extends FreedomService
|
||||
seniorAdminPermissions.addAll(telnetAdminPermissions);
|
||||
permissions.put(Rank.SENIOR_ADMIN, seniorAdminPermissions);
|
||||
|
||||
int count = operatorPermissions.size() + masterBuilderPermissions.size() + masterBuilderPermissions.size() + superAdminPermissions.size() + telnetAdminPermissions.size() + seniorAdminPermissions.size();
|
||||
int count = PermissionEntry.OPERATORS.getEntry().size() + PermissionEntry.MASTER_BUILDERS.getEntry().size() + PermissionEntry.SUPER_ADMINS.getEntry().size() + PermissionEntry.TELNET_ADMINS.getEntry().size() + PermissionEntry.SENIOR_ADMINS.getEntry().size();
|
||||
|
||||
FLog.info("Loaded " + count + " permission nodes");
|
||||
}
|
||||
|
@ -318,25 +318,9 @@ public class Shop extends FreedomService
|
||||
|
||||
player.sendMessage(getShopPrefix() + " " + ChatColor.GREEN + "Successfully purchased the \"" + shopItem.getColoredName() + ChatColor.GREEN + "\" for " + ChatColor.GOLD + price + ChatColor.GREEN + "!");
|
||||
|
||||
if (shopItem.equals(ShopItem.GRAPPLING_HOOK))
|
||||
if (shopItem.getCommand() != null)
|
||||
{
|
||||
player.sendMessage(ChatColor.GREEN + "Run /grapplinghook to get one!");
|
||||
}
|
||||
else if (shopItem.equals(ShopItem.LIGHTNING_ROD))
|
||||
{
|
||||
player.sendMessage(ChatColor.GREEN + "Run /lightningrod to get one!");
|
||||
}
|
||||
else if (shopItem.equals(ShopItem.FIRE_BALL))
|
||||
{
|
||||
player.sendMessage(ChatColor.GREEN + "Run /fireball to get one!");
|
||||
}
|
||||
else if (shopItem.equals(ShopItem.RIDEABLE_PEARL))
|
||||
{
|
||||
player.sendMessage(ChatColor.GREEN + "Run /rideablepearl to get one!");
|
||||
}
|
||||
else if (shopItem.equals(ShopItem.STACKING_POTATO))
|
||||
{
|
||||
player.sendMessage(ChatColor.GREEN + "Run /stackingpotato to get one!");
|
||||
player.sendMessage(ChatColor.GREEN + "Run " + shopItem.getCommand() + " to get one!");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -7,11 +7,11 @@ import org.bukkit.Material;
|
||||
|
||||
public enum ShopItem
|
||||
{
|
||||
GRAPPLING_HOOK("Grappling Hook", Material.FISHING_ROD, 10, ConfigEntry.SHOP_PRICES_GRAPPLING_HOOK, ChatColor.GREEN, "grapplingHook"),
|
||||
LIGHTNING_ROD("Lightning Rod", Material.BLAZE_ROD, 12, ConfigEntry.SHOP_PRICES_LIGHTNING_ROD, ChatColor.LIGHT_PURPLE, "lightningRod"),
|
||||
FIRE_BALL("Fire Ball", Material.FIRE_CHARGE, 14, ConfigEntry.SHOP_PRICES_FIRE_BALL, ChatColor.RED, "fireBall"),
|
||||
RIDEABLE_PEARL("Rideable Ender Pearl", Material.ENDER_PEARL, 16, ConfigEntry.SHOP_PRICES_RIDEABLE_PEARL, ChatColor.DARK_PURPLE, "rideablePearl"),
|
||||
STACKING_POTATO("Stacking Potato", Material.POTATO, 22, ConfigEntry.SHOP_PRICES_STACKING_POTATO, ChatColor.YELLOW, "stackingPotato");
|
||||
GRAPPLING_HOOK("Grappling Hook", Material.FISHING_ROD, 10, ConfigEntry.SHOP_PRICES_GRAPPLING_HOOK, ChatColor.GREEN, "grapplingHook", "/grapplinghook"),
|
||||
LIGHTNING_ROD("Lightning Rod", Material.BLAZE_ROD, 12, ConfigEntry.SHOP_PRICES_LIGHTNING_ROD, ChatColor.LIGHT_PURPLE, "lightningRod", "/lightningrod"),
|
||||
FIRE_BALL("Fire Ball", Material.FIRE_CHARGE, 14, ConfigEntry.SHOP_PRICES_FIRE_BALL, ChatColor.RED, "fireBall", "/fireball"),
|
||||
RIDEABLE_PEARL("Rideable Ender Pearl", Material.ENDER_PEARL, 16, ConfigEntry.SHOP_PRICES_RIDEABLE_PEARL, ChatColor.DARK_PURPLE, "rideablePearl", "/rideablepearl"),
|
||||
STACKING_POTATO("Stacking Potato", Material.POTATO, 22, ConfigEntry.SHOP_PRICES_STACKING_POTATO, ChatColor.YELLOW, "stackingPotato", "/stackingpotato");
|
||||
|
||||
/*
|
||||
Shop GUI Layout:
|
||||
@ -36,8 +36,10 @@ public enum ShopItem
|
||||
private final ChatColor color;
|
||||
@Getter
|
||||
private final String dataName;
|
||||
@Getter
|
||||
private final String command;
|
||||
|
||||
ShopItem(String name, Material icon, int slot, ConfigEntry cost, ChatColor color, String dataName)
|
||||
ShopItem(String name, Material icon, int slot, ConfigEntry cost, ChatColor color, String dataName, String command)
|
||||
{
|
||||
this.name = name;
|
||||
this.icon = icon;
|
||||
@ -45,6 +47,7 @@ public enum ShopItem
|
||||
this.cost = cost;
|
||||
this.color = color;
|
||||
this.dataName = dataName;
|
||||
this.command = command;
|
||||
}
|
||||
|
||||
public String getColoredName()
|
||||
|
Loading…
Reference in New Issue
Block a user