Updated NBTAPI, v2.4.1 ready for release.
This commit is contained in:
parent
acadac3c2a
commit
75a5c96d39
6 changed files with 11 additions and 11 deletions
2
pom.xml
2
pom.xml
|
@ -147,7 +147,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>de.tr7zw</groupId>
|
<groupId>de.tr7zw</groupId>
|
||||||
<artifactId>item-nbt-api</artifactId>
|
<artifactId>item-nbt-api</artifactId>
|
||||||
<version>2.6.0</version>
|
<version>2.7.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.MilkBowl</groupId>
|
<groupId>com.github.MilkBowl</groupId>
|
||||||
|
|
|
@ -115,14 +115,15 @@ public final class ThemeParkPlus extends JavaPlugin {
|
||||||
|
|
||||||
Bukkit.getLogger().info("[ThemeParkPlus] Loading listeners...");
|
Bukkit.getLogger().info("[ThemeParkPlus] Loading listeners...");
|
||||||
Bukkit.getPluginManager().registerEvents(new DirectionalGateListener(), this);
|
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 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);
|
Bukkit.getPluginManager().registerEvents(new WaitingTimeListener(), this);
|
||||||
if (getSConfig().getFile().getBoolean("AntiFreerun.Enabled")) {
|
if (getSConfig().getFile().getBoolean("AntiFreerun.Enabled")) {
|
||||||
Bukkit.getPluginManager().registerEvents(new AntiFreerunListener(), this);
|
Bukkit.getPluginManager().registerEvents(new AntiFreerunListener(), this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO Detect if ThemePark is found.
|
||||||
if (getSConfig().getFile().getBoolean("DiscordWebhook.Enabled")) {
|
if (getSConfig().getFile().getBoolean("DiscordWebhook.Enabled")) {
|
||||||
String URL = getSConfig().getFile().getString("DiscordWebhook.WebhookURL");
|
String URL = getSConfig().getFile().getString("DiscordWebhook.WebhookURL");
|
||||||
if (URL != null) {
|
if (URL != null) {
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package nl.sbdeveloper.themeparkplus.api;
|
package nl.sbdeveloper.themeparkplus.api;
|
||||||
|
|
||||||
import de.tr7zw.changeme.nbtapi.NBTItem;
|
import de.tr7zw.changeme.nbtapi.NBTItem;
|
||||||
import nl.iobyte.themepark.api.attraction.Attraction;
|
|
||||||
import nl.sbdeveloper.themeparkplus.ThemeParkPlus;
|
import nl.sbdeveloper.themeparkplus.ThemeParkPlus;
|
||||||
import nl.sbdeveloper.themeparkplus.api.objects.Gate;
|
import nl.sbdeveloper.themeparkplus.api.objects.Gate;
|
||||||
import nl.sbdeveloper.themeparkplus.api.objects.MalfunctionReport;
|
import nl.sbdeveloper.themeparkplus.api.objects.MalfunctionReport;
|
||||||
|
@ -170,7 +169,7 @@ public class PlusAPI {
|
||||||
* @return The ticket as ItemStack
|
* @return The ticket as ItemStack
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@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"));
|
String ticketName = ConfigUtil.makecolored(ThemeParkPlus.getSConfig().getFile().getString("Fastpass.Item.DisplayName"));
|
||||||
|
|
||||||
ItemStack ticket = XMaterial.PAPER.parseItem();
|
ItemStack ticket = XMaterial.PAPER.parseItem();
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package nl.sbdeveloper.themeparkplus.commands;
|
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.ThemeParkPlus;
|
||||||
import nl.sbdeveloper.themeparkplus.api.PlusAPI;
|
import nl.sbdeveloper.themeparkplus.api.PlusAPI;
|
||||||
import nl.sbdeveloper.themeparkplus.api.enums.WalkingDirection;
|
import nl.sbdeveloper.themeparkplus.api.enums.WalkingDirection;
|
||||||
|
@ -196,17 +194,19 @@ public class TPPCMD implements CommandExecutor {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean giveFPTicketCommand(CommandSender sender, String[] args) {
|
private boolean giveFPTicketCommand(CommandSender sender, String[] args) {
|
||||||
|
//TODO Detect if ThemePark is found.
|
||||||
|
|
||||||
if (args.length == 2 && !(sender instanceof Player)) {
|
if (args.length == 2 && !(sender instanceof Player)) {
|
||||||
sender.sendMessage(ConfigUtil.getMessage("General.NoPlayer"));
|
sender.sendMessage(ConfigUtil.getMessage("General.NoPlayer"));
|
||||||
return true;
|
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])));
|
sender.sendMessage(ConfigUtil.getMessage("Fastpass.UnknownRide", Collections.singletonMap("%ridename%", args[1])));
|
||||||
return true;
|
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;
|
Player target;
|
||||||
if (args.length == 3) {
|
if (args.length == 3) {
|
||||||
|
@ -404,7 +404,7 @@ public class TPPCMD implements CommandExecutor {
|
||||||
|
|
||||||
Bukkit.getScheduler().runTaskLaterAsynchronously(ThemeParkPlus.getInstance(), () -> cub.getBlocks().forEach(block -> {
|
Bukkit.getScheduler().runTaskLaterAsynchronously(ThemeParkPlus.getInstance(), () -> cub.getBlocks().forEach(block -> {
|
||||||
if (block.getType().name().contains("REDSTONE_LAMP")) Bukkit.getScheduler().runTask(ThemeParkPlus.getInstance(), () -> LGUtil.zetLampUit(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))));
|
if (ConfigUtil.sendConsole(sender)) sender.sendMessage(ConfigUtil.getMessage("Lamps.TurnedOnSec", Collections.singletonMap("%sec%", String.valueOf(secOn))));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -5,7 +5,6 @@ import nl.iobyte.themepark.api.attraction.Attraction;
|
||||||
import nl.sbdeveloper.themeparkplus.ThemeParkPlus;
|
import nl.sbdeveloper.themeparkplus.ThemeParkPlus;
|
||||||
import nl.sbdeveloper.themeparkplus.gui.MalfunctionGUI;
|
import nl.sbdeveloper.themeparkplus.gui.MalfunctionGUI;
|
||||||
import nl.sbdeveloper.themeparkplus.util.ConfigUtil;
|
import nl.sbdeveloper.themeparkplus.util.ConfigUtil;
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.block.Sign;
|
import org.bukkit.block.Sign;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
|
|
|
@ -41,6 +41,7 @@ public class SignListeners implements Listener {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO Detect if ThemePark is found.
|
||||||
if (!API.isAttraction(lines[2])) {
|
if (!API.isAttraction(lines[2])) {
|
||||||
p.sendMessage(ConfigUtil.getMessage("Fastpass.UnknownRide", Collections.singletonMap("ridename", e.getLine(2))));
|
p.sendMessage(ConfigUtil.getMessage("Fastpass.UnknownRide", Collections.singletonMap("ridename", e.getLine(2))));
|
||||||
return;
|
return;
|
||||||
|
|
Reference in a new issue