mirror of
https://github.com/CivMC/Civ.git
synced 2026-07-18 00:20:44 +00:00
Update to CivModCore 1.8.2
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
<dependency>
|
||||
<groupId>vg.civcraft.mc.civmodcore</groupId>
|
||||
<artifactId>CivModCore</artifactId>
|
||||
<version>1.8.1</version>
|
||||
<version>1.8.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -46,4 +46,4 @@
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
</project>
|
||||
|
||||
@@ -6,15 +6,13 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import vg.civcraft.mc.civmodcore.api.ItemAPI;
|
||||
import vg.civcraft.mc.civmodcore.inventory.items.ItemUtils;
|
||||
import vg.civcraft.mc.civmodcore.inventorygui.Clickable;
|
||||
import vg.civcraft.mc.civmodcore.inventorygui.IClickable;
|
||||
import vg.civcraft.mc.civmodcore.inventorygui.MultiPageView;
|
||||
@@ -71,7 +69,7 @@ public class NameColorSetting extends PlayerSetting<ChatColor> {
|
||||
applyInfoToItemStack(item, player);
|
||||
Player play = Bukkit.getPlayer(player);
|
||||
if (play != null && !play.hasPermission(COLOR_PERMISSION) && !play.hasPermission(RAINBOW_PERMISSION)) {
|
||||
ItemAPI.addLore(item, ChatColor.RED + "You do not have permission to do this");
|
||||
ItemUtils.addLore(item, ChatColor.RED + "You do not have permission to do this");
|
||||
}
|
||||
return item;
|
||||
}
|
||||
@@ -83,7 +81,7 @@ public class NameColorSetting extends PlayerSetting<ChatColor> {
|
||||
|
||||
for (Entry<ChatColor, Material> entry : colorToGui.entrySet()) {
|
||||
ItemStack is = new ItemStack(entry.getValue());
|
||||
ItemAPI.setDisplayName(is,
|
||||
ItemUtils.setDisplayName(is,
|
||||
"Change to color of your name to " + entry.getKey() + entry.getKey().name());
|
||||
clicks.add(new Clickable(is) {
|
||||
|
||||
@@ -98,7 +96,7 @@ public class NameColorSetting extends PlayerSetting<ChatColor> {
|
||||
}
|
||||
if (player.hasPermission(RAINBOW_PERMISSION)) {
|
||||
ItemStack is = new ItemStack(Material.YELLOW_STAINED_GLASS);
|
||||
ItemAPI.setDisplayName(is, "Change to color of your name to " + NameColors.rainbowify("rainbow"));
|
||||
ItemUtils.setDisplayName(is, "Change to color of your name to " + NameColors.rainbowify("rainbow"));
|
||||
clicks.add(new Clickable(is) {
|
||||
|
||||
@Override
|
||||
@@ -114,7 +112,7 @@ public class NameColorSetting extends PlayerSetting<ChatColor> {
|
||||
}
|
||||
MultiPageView view = new MultiPageView(player, clicks, "Select a name color", true);
|
||||
ItemStack returnStack = new ItemStack(Material.BOOK);
|
||||
ItemAPI.setDisplayName(returnStack, "Return to previous menu");
|
||||
ItemUtils.setDisplayName(returnStack, "Return to previous menu");
|
||||
view.setMenuSlot(new Clickable(returnStack) {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -5,7 +5,6 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.player.PlayerLoginEvent;
|
||||
|
||||
import vg.civcraft.mc.civchat2.CivChat2;
|
||||
import vg.civcraft.mc.civmodcore.ACivMod;
|
||||
import vg.civcraft.mc.civmodcore.playersettings.PlayerSettingAPI;
|
||||
|
||||
Reference in New Issue
Block a user