mirror of
https://github.com/songoda/EpicFarming.git
synced 2025-02-18 21:41:31 +01:00
Update to core version 3.3.0-SNAPSHOT
This commit is contained in:
parent
cc10775d0c
commit
89bed57e18
2
pom.xml
2
pom.xml
@ -123,7 +123,7 @@
|
||||
<dependency>
|
||||
<groupId>com.craftaro</groupId>
|
||||
<artifactId>CraftaroCore</artifactId>
|
||||
<version>3.1.0-SNAPSHOT</version>
|
||||
<version>3.3.0-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
|
@ -354,7 +354,7 @@ public class EpicFarming extends SongodaPlugin {
|
||||
ItemStack item = Settings.FARM_BLOCK_MATERIAL.getMaterial().parseItem();
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.setDisplayName(TextUtils.formatText(Methods.formatName(level.getLevel())));
|
||||
String line = getLocale().getMessage("general.nametag.lore").getMessage();
|
||||
String line = getLocale().getMessage("general.nametag.lore").toText();
|
||||
if (!line.equals("")) {
|
||||
meta.setLore(Collections.singletonList(line));
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ public class Farm implements Data {
|
||||
}
|
||||
|
||||
if (Settings.USE_PROTECTION_PLUGINS.getBoolean() && !ProtectionManager.canInteract(player, this.location)) {
|
||||
player.sendMessage(EpicFarming.getInstance().getLocale().getMessage("event.general.protected").getPrefixedMessage());
|
||||
EpicFarming.getInstance().getLocale().getMessage("event.general.protected").sendPrefixedMessage(player);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@ public enum FarmType {
|
||||
return EpicFarming.getPlugin(EpicFarming.class)
|
||||
.getLocale()
|
||||
.getMessage("general.interface." + name().toLowerCase())
|
||||
.getMessage();
|
||||
.toText();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -36,22 +36,22 @@ public class Level {
|
||||
EpicFarming instance = EpicFarming.getPlugin(EpicFarming.class);
|
||||
|
||||
this.description.add(instance.getLocale().getMessage("interface.button.radius")
|
||||
.processPlaceholder("radius", this.radius).getMessage());
|
||||
.processPlaceholder("radius", this.radius).toText());
|
||||
|
||||
this.description.add(instance.getLocale().getMessage("interface.button.speed")
|
||||
.processPlaceholder("speed", this.speedMultiplier).getMessage());
|
||||
.processPlaceholder("speed", this.speedMultiplier).toText());
|
||||
|
||||
|
||||
if (this.autoReplant) {
|
||||
this.description.add(instance.getLocale().getMessage("interface.button.autoreplant")
|
||||
.processPlaceholder("status",
|
||||
instance.getLocale().getMessage("general.interface.unlocked")
|
||||
.getMessage()).getMessage());
|
||||
.toText()).toText());
|
||||
}
|
||||
|
||||
if (this.pages > 1) {
|
||||
this.description.add(instance.getLocale().getMessage("interface.button.pages")
|
||||
.processPlaceholder("amount", this.pages).getMessage());
|
||||
.processPlaceholder("amount", this.pages).toText());
|
||||
}
|
||||
|
||||
for (Module module : this.registeredModules) {
|
||||
|
@ -143,7 +143,7 @@ public class ModuleAutoBreeding extends Module {
|
||||
return this.plugin.getLocale()
|
||||
.getMessage("interface.button.autobreeding")
|
||||
.processPlaceholder("status", this.autoBreedCap)
|
||||
.getMessage();
|
||||
.toText();
|
||||
}
|
||||
|
||||
private void handleStackedBreed(LivingEntity entity) {
|
||||
|
@ -92,7 +92,7 @@ public class ModuleAutoButcher extends Module {
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return this.plugin.getLocale().getMessage("interface.button.autobutcher")
|
||||
.processPlaceholder("status", this.autoButcherDelay).getMessage();
|
||||
.processPlaceholder("status", this.autoButcherDelay).toText();
|
||||
}
|
||||
|
||||
private boolean isEnabled(Farm farm) {
|
||||
|
@ -175,8 +175,8 @@ public class ModuleAutoCollect extends Module {
|
||||
return this.plugin.getLocale()
|
||||
.getMessage("interface.button.autocollect")
|
||||
.processPlaceholder("status",
|
||||
this.plugin.getLocale().getMessage("general.interface.unlocked").getMessage())
|
||||
.getMessage();
|
||||
this.plugin.getLocale().getMessage("general.interface.unlocked").toText())
|
||||
.toText();
|
||||
}
|
||||
|
||||
public boolean isEnabled(Farm farm) {
|
||||
@ -283,7 +283,7 @@ public class ModuleAutoCollect extends Module {
|
||||
return EpicFarming.getPlugin(EpicFarming.class)
|
||||
.getLocale()
|
||||
.getMessage("general.interface." + name().replace("_", "").toLowerCase())
|
||||
.getMessage();
|
||||
.toText();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.craftaro.epicfarming.gui;
|
||||
|
||||
import com.craftaro.core.chat.AdventureUtils;
|
||||
import com.craftaro.core.gui.CustomizableGui;
|
||||
import com.craftaro.core.gui.GuiUtils;
|
||||
import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial;
|
||||
@ -98,10 +99,10 @@ public class OverviewGui extends CustomizableGui {
|
||||
List<String> farmLore = this.level.getDescription();
|
||||
farmLore.add("");
|
||||
if (nextLevel == null) {
|
||||
farmLore.add(this.plugin.getLocale().getMessage("event.upgrade.maxed").getMessage());
|
||||
farmLore.add(this.plugin.getLocale().getMessage("event.upgrade.maxed").toText());
|
||||
} else {
|
||||
farmLore.add(this.plugin.getLocale().getMessage("interface.button.level")
|
||||
.processPlaceholder("level", nextLevel.getLevel()).getMessage());
|
||||
.processPlaceholder("level", nextLevel.getLevel()).toText());
|
||||
farmLore.addAll(nextLevel.getDescription());
|
||||
}
|
||||
|
||||
@ -110,16 +111,16 @@ public class OverviewGui extends CustomizableGui {
|
||||
String[] parts = this.plugin.getLocale().getMessage("interface.button.boostedstats")
|
||||
.processPlaceholder("amount", Integer.toString(boostData.getMultiplier()))
|
||||
.processPlaceholder("time", TimeUtils.makeReadable(boostData.getEndTime() - System.currentTimeMillis()))
|
||||
.getMessage().split("\\|");
|
||||
.toText().split("\\|");
|
||||
farmLore.add("");
|
||||
for (String line : parts) {
|
||||
farmLore.add(TextUtils.formatText(line));
|
||||
farmLore.add(AdventureUtils.formatLegacy(line));
|
||||
}
|
||||
}
|
||||
|
||||
setItem("farm", 13, GuiUtils.createButtonItem(Settings.FARM_BLOCK_MATERIAL.getMaterial(XMaterial.END_ROD),
|
||||
this.plugin.getLocale().getMessage("general.nametag.farm")
|
||||
.processPlaceholder("level", this.level.getLevel()).getMessage(),
|
||||
.processPlaceholder("level", this.level.getLevel()).toText(),
|
||||
farmLore));
|
||||
|
||||
if (this.player != null && Settings.UPGRADE_WITH_XP.getBoolean() && this.player.hasPermission("EpicFarming.Upgrade.XP")) {
|
||||
@ -162,9 +163,9 @@ public class OverviewGui extends CustomizableGui {
|
||||
ItemMeta farmTypeMeta = farmType.getItemMeta();
|
||||
farmTypeMeta.setDisplayName(this.plugin.getLocale().getMessage("interface.button.farmtype")
|
||||
.processPlaceholder("type", this.farm.getFarmType().translate())
|
||||
.getMessage());
|
||||
.toText());
|
||||
farmTypeMeta.setLore(Collections.singletonList(this.plugin.getLocale().getMessage("interface.button.farmtypelore")
|
||||
.getMessage()));
|
||||
.toText()));
|
||||
farmType.setItemMeta(farmTypeMeta);
|
||||
|
||||
Map<Integer, Integer[]> layouts = new HashMap<>();
|
||||
|
@ -26,7 +26,7 @@ public class Methods {
|
||||
.getLocale()
|
||||
.getMessage("general.nametag.farm")
|
||||
.processPlaceholder("level", level)
|
||||
.getMessage();
|
||||
.toText();
|
||||
}
|
||||
|
||||
public static void animate(Location location, XMaterial material) {
|
||||
|
Loading…
Reference in New Issue
Block a user