Added a couple new api features

This commit is contained in:
Paldiu 2021-02-22 12:43:56 -06:00
parent be3d38b868
commit 4bf672d3ee
5 changed files with 54 additions and 3 deletions

View File

@ -2,7 +2,7 @@ package io.github.paldiu.simplexcore;
import io.github.paldiu.simplexcore.command.defaults.Command_info;
import io.github.paldiu.simplexcore.concurrent.Announcer;
import io.github.paldiu.simplexcore.listener.ServerPluginListener;
import io.github.paldiu.simplexcore.listener.DependencyListener;
import io.github.paldiu.simplexcore.listener.SimplexListener;
import io.github.paldiu.simplexcore.plugin.SimplexAddon;
import io.github.paldiu.simplexcore.utils.Constants;
@ -35,7 +35,7 @@ public final class SimplexCore extends SimplexAddon<SimplexCore> {
Constants.getCommandLoader().classpath(Command_info.class).load();
Constants.getConfig().reload();
//
SimplexListener.register(new ServerPluginListener(), this);
SimplexListener.register(new DependencyListener(), this);
new Announcer();
} catch (Exception ex) {
suspended = true;

View File

@ -9,7 +9,7 @@ import org.bukkit.event.server.PluginEnableEvent;
import java.util.ArrayList;
import java.util.List;
public final class ServerPluginListener extends SimplexListener {
public final class DependencyListener extends SimplexListener {
public List<String> PAPI_NAMES = new ArrayList<>() {{
add("PlaceholderAPI");
add("PlaceHolderAPI");

View File

@ -0,0 +1,17 @@
package io.github.paldiu.simplexcore.sign;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.block.Block;
public interface IUsableSign {
Block getBlock();
Location getSignLocation();
World getWorld();
String getSignText();
void executeOnInteract();
}

View File

@ -0,0 +1,29 @@
package io.github.paldiu.simplexcore.structures;
import io.github.paldiu.simplexcore.math.Size;
import org.bukkit.Location;
import org.bukkit.NamespacedKey;
import org.bukkit.World;
import org.bukkit.block.Block;
public interface IStructure {
NamespacedKey getNamespacedKey();
String getName();
int getId();
Location getLocation();
World getWorld();
boolean shouldGenerateNaturally();
void generate(Location location, World world);
void generate(Location location, World world, boolean generateNaturally);
Size getApproximateSize();
Block[] getBlocks();
}

View File

@ -0,0 +1,5 @@
package io.github.paldiu.simplexcore.structures;
public class Structure {
// TODO: Write this file to parse schematics.
}