3
0
Fork 0

Updated NBTAPI, v2.4.1 ready for release.

This commit is contained in:
stijnb1234 2021-02-22 19:15:17 +01:00
parent acadac3c2a
commit 75a5c96d39
6 changed files with 11 additions and 11 deletions

View file

@ -147,7 +147,7 @@
<dependency>
<groupId>de.tr7zw</groupId>
<artifactId>item-nbt-api</artifactId>
<version>2.6.0</version>
<version>2.7.1</version>
</dependency>
<dependency>
<groupId>com.github.MilkBowl</groupId>

View file

@ -115,14 +115,15 @@ public final class ThemeParkPlus extends JavaPlugin {
Bukkit.getLogger().info("[ThemeParkPlus] Loading listeners...");
Bukkit.getPluginManager().registerEvents(new DirectionalGateListener(), this);
Bukkit.getPluginManager().registerEvents(new FastpassListeners(), this);
Bukkit.getPluginManager().registerEvents(new FastpassListeners(), this); //TODO Detect if ThemePark is found.
Bukkit.getPluginManager().registerEvents(new SignListeners(), this);
Bukkit.getPluginManager().registerEvents(new MalfunctionListener(), this);
Bukkit.getPluginManager().registerEvents(new MalfunctionListener(), this); //TODO Detect if ThemePark is found.
Bukkit.getPluginManager().registerEvents(new WaitingTimeListener(), this);
if (getSConfig().getFile().getBoolean("AntiFreerun.Enabled")) {
Bukkit.getPluginManager().registerEvents(new AntiFreerunListener(), this);
}
//TODO Detect if ThemePark is found.
if (getSConfig().getFile().getBoolean("DiscordWebhook.Enabled")) {
String URL = getSConfig().getFile().getString("DiscordWebhook.WebhookURL");
if (URL != null) {

View file

@ -1,7 +1,6 @@
package nl.sbdeveloper.themeparkplus.api;
import de.tr7zw.changeme.nbtapi.NBTItem;
import nl.iobyte.themepark.api.attraction.Attraction;
import nl.sbdeveloper.themeparkplus.ThemeParkPlus;
import nl.sbdeveloper.themeparkplus.api.objects.Gate;
import nl.sbdeveloper.themeparkplus.api.objects.MalfunctionReport;
@ -170,7 +169,7 @@ public class PlusAPI {
* @return The ticket as ItemStack
*/
@Nullable
public static ItemStack getFastpassTicket(Attraction att) {
public static ItemStack getFastpassTicket(nl.iobyte.themepark.api.attraction.Attraction att) {
String ticketName = ConfigUtil.makecolored(ThemeParkPlus.getSConfig().getFile().getString("Fastpass.Item.DisplayName"));
ItemStack ticket = XMaterial.PAPER.parseItem();

View file

@ -1,7 +1,5 @@
package nl.sbdeveloper.themeparkplus.commands;
import nl.iobyte.themepark.api.API;
import nl.iobyte.themepark.api.attraction.Attraction;
import nl.sbdeveloper.themeparkplus.ThemeParkPlus;
import nl.sbdeveloper.themeparkplus.api.PlusAPI;
import nl.sbdeveloper.themeparkplus.api.enums.WalkingDirection;
@ -196,17 +194,19 @@ public class TPPCMD implements CommandExecutor {
}
private boolean giveFPTicketCommand(CommandSender sender, String[] args) {
//TODO Detect if ThemePark is found.
if (args.length == 2 && !(sender instanceof Player)) {
sender.sendMessage(ConfigUtil.getMessage("General.NoPlayer"));
return true;
}
if (!API.isAttraction(args[1])) {
if (!nl.iobyte.themepark.api.API.isAttraction(args[1])) {
sender.sendMessage(ConfigUtil.getMessage("Fastpass.UnknownRide", Collections.singletonMap("%ridename%", args[1])));
return true;
}
Attraction att = API.getAttraction(args[1]);
nl.iobyte.themepark.api.attraction.Attraction att = nl.iobyte.themepark.api.API.getAttraction(args[1]);
Player target;
if (args.length == 3) {
@ -404,7 +404,7 @@ public class TPPCMD implements CommandExecutor {
Bukkit.getScheduler().runTaskLaterAsynchronously(ThemeParkPlus.getInstance(), () -> cub.getBlocks().forEach(block -> {
if (block.getType().name().contains("REDSTONE_LAMP")) Bukkit.getScheduler().runTask(ThemeParkPlus.getInstance(), () -> LGUtil.zetLampUit(block));
}), secOn * 20);
}), secOn * 20L);
if (ConfigUtil.sendConsole(sender)) sender.sendMessage(ConfigUtil.getMessage("Lamps.TurnedOnSec", Collections.singletonMap("%sec%", String.valueOf(secOn))));
}
return true;

View file

@ -5,7 +5,6 @@ import nl.iobyte.themepark.api.attraction.Attraction;
import nl.sbdeveloper.themeparkplus.ThemeParkPlus;
import nl.sbdeveloper.themeparkplus.gui.MalfunctionGUI;
import nl.sbdeveloper.themeparkplus.util.ConfigUtil;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.block.Sign;
import org.bukkit.event.EventHandler;

View file

@ -41,6 +41,7 @@ public class SignListeners implements Listener {
return;
}
//TODO Detect if ThemePark is found.
if (!API.isAttraction(lines[2])) {
p.sendMessage(ConfigUtil.getMessage("Fastpass.UnknownRide", Collections.singletonMap("ridename", e.getLine(2))));
return;