mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2025-01-25 08:51:33 +01:00
Maven Project
# Added the alias '/island teleport <player>' to the command '/island visit [<player>]'. # Fixed NSME when sending a World Border to a player on servers using 1.9 & 1.10. # Fixed NSFE when buying 'Spawner Boost' upgrade on servers using paperclip 1.12. # Fixed Placeholders not working for Upgrade messages.
This commit is contained in:
parent
5e47f8b108
commit
45d8527ebc
26
SkyBlock.iml
26
SkyBlock.iml
@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="minecraft" name="Minecraft">
|
||||
<configuration>
|
||||
<autoDetectTypes>
|
||||
<platformType>SPIGOT</platformType>
|
||||
</autoDetectTypes>
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Maven: be.maximvdw:placeholderapi:2.5.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: me.clip:placeholderapi:2.5.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.spigotmc:spigot:1.13.2" level="project" />
|
||||
</component>
|
||||
</module>
|
59
pom.xml
59
pom.xml
@ -1,55 +1,6 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0">
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>Skyblock</artifactId>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<version>32</version>
|
||||
<build>
|
||||
<defaultGoal>clean package</defaultGoal>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<version>3.6.1</version>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>resources</directory>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
<sourceDirectory>src</sourceDirectory>
|
||||
</build>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>private</id>
|
||||
<url>http://repo.songoda.com/repository/private</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>be.maximvdw</groupId>
|
||||
<artifactId>placeholderapi</artifactId>
|
||||
<version>2.5.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>me.clip</groupId>
|
||||
<artifactId>placeholderapi</artifactId>
|
||||
<version>LATEST</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.milkbowl</groupId>
|
||||
<artifactId>vault</artifactId>
|
||||
<version>LATEST</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot</artifactId>
|
||||
<version>1.13.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SkyBlock</artifactId>
|
||||
<version>32</version>
|
||||
</project>
|
@ -52,7 +52,7 @@ import me.goodandevil.skyblock.world.generator.VoidGenerator;
|
||||
public class SkyBlock extends JavaPlugin {
|
||||
|
||||
private static SkyBlock instance;
|
||||
|
||||
|
||||
private FileManager fileManager;
|
||||
private WorldManager worldManager;
|
||||
private VisitManager visitManager;
|
||||
@ -73,15 +73,11 @@ public class SkyBlock extends JavaPlugin {
|
||||
private LeaderboardManager leaderboardManager;
|
||||
private MessageManager messageManager;
|
||||
private EconomyManager economyManager;
|
||||
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
instance = this;
|
||||
|
||||
if (!isEnable()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
fileManager = new FileManager(this);
|
||||
worldManager = new WorldManager(this);
|
||||
visitManager = new VisitManager(this);
|
||||
@ -90,33 +86,33 @@ public class SkyBlock extends JavaPlugin {
|
||||
upgradeManager = new UpgradeManager(this);
|
||||
creationManager = new CreationManager(this);
|
||||
playerDataManager = new PlayerDataManager(this);
|
||||
|
||||
|
||||
if (fileManager.getConfig(new File(getDataFolder(), "config.yml")).getFileConfiguration().getBoolean("Island.Scoreboard.Enable")) {
|
||||
scoreboardManager = new ScoreboardManager(this);
|
||||
}
|
||||
|
||||
|
||||
inviteManager = new InviteManager(this);
|
||||
biomeManager = new BiomeManager(this);
|
||||
levellingManager = new LevellingManager(this);
|
||||
commandManager = new CommandManager(this);
|
||||
structureManager = new StructureManager(this);
|
||||
soundManager = new SoundManager(this);
|
||||
|
||||
|
||||
if (fileManager.getConfig(new File(getDataFolder(), "config.yml")).getFileConfiguration().getBoolean("Island.Generator.Enable")) {
|
||||
generatorManager = new GeneratorManager(this);
|
||||
}
|
||||
|
||||
|
||||
placeholderManager = new PlaceholderManager(this);
|
||||
placeholderManager.registerPlaceholders();
|
||||
|
||||
|
||||
leaderboardManager = new LeaderboardManager(this);
|
||||
messageManager = new MessageManager(this);
|
||||
economyManager = new EconomyManager();
|
||||
|
||||
|
||||
new PlaytimeTask(playerDataManager, islandManager).runTaskTimerAsynchronously(this, 0L, 20L);
|
||||
new VisitTask(playerDataManager).runTaskTimerAsynchronously(this, 0L, 20L);
|
||||
new ConfirmationTask(playerDataManager).runTaskTimerAsynchronously(this, 0L, 20L);
|
||||
|
||||
|
||||
PluginManager pluginManager = getServer().getPluginManager();
|
||||
pluginManager.registerEvents(new Join(this), this);
|
||||
pluginManager.registerEvents(new Quit(this), this);
|
||||
@ -134,136 +130,132 @@ public class SkyBlock extends JavaPlugin {
|
||||
pluginManager.registerEvents(new Respawn(this), this);
|
||||
pluginManager.registerEvents(new Chat(this), this);
|
||||
pluginManager.registerEvents(new Spawner(this), this);
|
||||
|
||||
|
||||
pluginManager.registerEvents(new Rollback(), this);
|
||||
|
||||
|
||||
pluginManager.registerEvents(new me.goodandevil.skyblock.menus.admin.Levelling(), this);
|
||||
pluginManager.registerEvents(new me.goodandevil.skyblock.menus.admin.Creator(), this);
|
||||
pluginManager.registerEvents(new me.goodandevil.skyblock.menus.admin.Settings(), this);
|
||||
pluginManager.registerEvents(new Generator(), this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
if (this.levellingManager != null) {
|
||||
this.levellingManager.onDisable();
|
||||
}
|
||||
|
||||
|
||||
if (this.islandManager != null) {
|
||||
this.islandManager.onDisable();
|
||||
}
|
||||
|
||||
|
||||
if (this.visitManager != null) {
|
||||
this.visitManager.onDisable();
|
||||
}
|
||||
|
||||
|
||||
if (this.banManager != null) {
|
||||
this.banManager.onDisable();
|
||||
}
|
||||
|
||||
|
||||
if (this.biomeManager != null) {
|
||||
this.biomeManager.onDisable();
|
||||
}
|
||||
|
||||
|
||||
if (this.creationManager != null) {
|
||||
this.creationManager.onDisable();
|
||||
}
|
||||
|
||||
|
||||
if (this.playerDataManager != null) {
|
||||
this.playerDataManager.onDisable();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static SkyBlock getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
public FileManager getFileManager() {
|
||||
return fileManager;
|
||||
}
|
||||
|
||||
|
||||
public WorldManager getWorldManager() {
|
||||
return worldManager;
|
||||
}
|
||||
|
||||
|
||||
public VisitManager getVisitManager() {
|
||||
return visitManager;
|
||||
}
|
||||
|
||||
|
||||
public BanManager getBanManager() {
|
||||
return banManager;
|
||||
}
|
||||
|
||||
|
||||
public IslandManager getIslandManager() {
|
||||
return islandManager;
|
||||
}
|
||||
|
||||
|
||||
public UpgradeManager getUpgradeManager() {
|
||||
return upgradeManager;
|
||||
}
|
||||
|
||||
|
||||
public CreationManager getCreationManager() {
|
||||
return creationManager;
|
||||
}
|
||||
|
||||
|
||||
public PlayerDataManager getPlayerDataManager() {
|
||||
return playerDataManager;
|
||||
}
|
||||
|
||||
|
||||
public ScoreboardManager getScoreboardManager() {
|
||||
return scoreboardManager;
|
||||
}
|
||||
|
||||
|
||||
public InviteManager getInviteManager() {
|
||||
return inviteManager;
|
||||
}
|
||||
|
||||
|
||||
public BiomeManager getBiomeManager() {
|
||||
return biomeManager;
|
||||
}
|
||||
|
||||
|
||||
public LevellingManager getLevellingManager() {
|
||||
return levellingManager;
|
||||
}
|
||||
|
||||
|
||||
public CommandManager getCommandManager() {
|
||||
return commandManager;
|
||||
}
|
||||
|
||||
|
||||
public StructureManager getStructureManager() {
|
||||
return structureManager;
|
||||
}
|
||||
|
||||
|
||||
public SoundManager getSoundManager() {
|
||||
return soundManager;
|
||||
}
|
||||
|
||||
|
||||
public GeneratorManager getGeneratorManager() {
|
||||
return generatorManager;
|
||||
}
|
||||
|
||||
|
||||
public PlaceholderManager getPlaceholderManager() {
|
||||
return placeholderManager;
|
||||
}
|
||||
|
||||
|
||||
public LeaderboardManager getLeaderboardManager() {
|
||||
return leaderboardManager;
|
||||
}
|
||||
|
||||
|
||||
public MessageManager getMessageManager() {
|
||||
return messageManager;
|
||||
}
|
||||
|
||||
|
||||
public EconomyManager getEconomyManager() {
|
||||
return economyManager;
|
||||
}
|
||||
|
||||
public boolean isEnable() {
|
||||
return false;
|
||||
|
||||
@Override
|
||||
public ChunkGenerator getDefaultWorldGenerator(String worldName, String id) {
|
||||
return new VoidGenerator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChunkGenerator getDefaultWorldGenerator(String worldName, String id) {
|
||||
return new VoidGenerator();
|
||||
}
|
||||
}
|
@ -0,0 +1,78 @@
|
||||
package me.goodandevil.skyblock.command.commands;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import me.goodandevil.skyblock.SkyBlock;
|
||||
import me.goodandevil.skyblock.command.CommandManager;
|
||||
import me.goodandevil.skyblock.command.SubCommand;
|
||||
import me.goodandevil.skyblock.command.CommandManager.Type;
|
||||
import me.goodandevil.skyblock.menus.Visit;
|
||||
import me.goodandevil.skyblock.message.MessageManager;
|
||||
import me.goodandevil.skyblock.playerdata.PlayerData;
|
||||
import me.goodandevil.skyblock.sound.SoundManager;
|
||||
import me.goodandevil.skyblock.utils.version.Sounds;
|
||||
|
||||
public class VisitCommand extends SubCommand {
|
||||
|
||||
private final SkyBlock skyblock;
|
||||
private String info;
|
||||
|
||||
public VisitCommand(SkyBlock skyblock) {
|
||||
this.skyblock = skyblock;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCommand(Player player, String[] args) {
|
||||
MessageManager messageManager = skyblock.getMessageManager();
|
||||
SoundManager soundManager = skyblock.getSoundManager();
|
||||
|
||||
if (args.length == 0) {
|
||||
PlayerData playerData = skyblock.getPlayerDataManager().getPlayerData(player);
|
||||
playerData.setType(Visit.Type.Default);
|
||||
playerData.setSort(Visit.Sort.Default);
|
||||
|
||||
Visit.getInstance().open(player, (Visit.Type) playerData.getType(), (Visit.Sort) playerData.getSort());
|
||||
soundManager.playSound(player, Sounds.CHEST_OPEN.bukkitSound(), 1.0F, 1.0F);
|
||||
} else if (args.length == 1) {
|
||||
Bukkit.getServer().getScheduler().runTask(skyblock, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Bukkit.getServer().dispatchCommand(player, "island teleport " + args[0]);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
messageManager.sendMessage(player, skyblock.getFileManager().getConfig(new File(skyblock.getDataFolder(), "language.yml")).getFileConfiguration().getString("Command.Island.Visit.Invalid.Message"));
|
||||
soundManager.playSound(player, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "visit";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SubCommand setInfo(String info) {
|
||||
this.info = info;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getAliases() {
|
||||
return new String[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public Type getType() {
|
||||
return CommandManager.Type.Default;
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user