1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-01-02 14:29:07 +01:00

There is no limit in gui title

This commit is contained in:
montlikadani 2021-02-09 12:06:14 +01:00
parent 078c66a321
commit 27645ec438
3 changed files with 6 additions and 19 deletions

View File

@ -159,10 +159,6 @@ public class CMIGui {
}
public void setTitle(String title) {
if (title.length() > 32) {
title = title.substring(0, 31) + "~";
}
this.title = title;
}

View File

@ -10,7 +10,6 @@ import java.util.Map.Entry;
import org.bukkit.block.Block;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.metadata.FixedMetadataValue;
import org.bukkit.metadata.MetadataValue;
@ -182,17 +181,15 @@ public class BlockOwnerShip {
f = f2;
FileConfiguration config = f.getConfig();
String path = (type == BlockTypes.FURNACE ? "Furnace"
: type == BlockTypes.BLAST_FURNACE ? "BlastFurnace"
: type == BlockTypes.BREWING_STAND ? "Brewing" : type == BlockTypes.SMOKER ? "Smoker" : "");
if (isReassignDisabled() || !config.isConfigurationSection(path))
if (isReassignDisabled() || !f.getConfig().isConfigurationSection(path))
return;
int total = 0;
ConfigurationSection section = config.getConfigurationSection(path);
ConfigurationSection section = f.getConfig().getConfigurationSection(path);
for (String one : section.getKeys(false)) {
String value = section.getString(one);
List<String> ls = new ArrayList<>();
@ -249,12 +246,10 @@ public class BlockOwnerShip {
return;
}
FileConfiguration config = f.getConfig();
String path = (type == BlockTypes.FURNACE ? "Furnace"
: type == BlockTypes.BLAST_FURNACE ? "BlastFurnace"
: type == BlockTypes.BREWING_STAND ? "Brewing" : type == BlockTypes.SMOKER ? "Smoker" : "");
config.set(path, null);
f.getConfig().set(path, null);
for (Entry<UUID, List<blockLoc>> one : blockOwnerShips.entrySet()) {
String full = "";
@ -266,7 +261,7 @@ public class BlockOwnerShip {
}
if (!full.isEmpty())
config.set(path + "." + one.getKey().toString(), full);
f.getConfig().set(path + "." + one.getKey().toString(), full);
}
f.saveConfig();

View File

@ -490,12 +490,8 @@ public class JobsPaymentListener implements Listener {
return;
if (event.getState() == PlayerFishEvent.State.CAUGHT_FISH && event.getCaught() instanceof Item) {
JobsPlayer jPlayer = Jobs.getPlayerManager().getJobsPlayer(player);
if (jPlayer == null)
return;
ItemStack items = ((Item) event.getCaught()).getItemStack();
Jobs.action(jPlayer, new ItemActionInfo(items, ActionType.FISH));
Jobs.action(Jobs.getPlayerManager().getJobsPlayer(player),
new ItemActionInfo(((Item) event.getCaught()).getItemStack(), ActionType.FISH));
}
}