diff --git a/bin/main/config.yml b/bin/main/config.yml new file mode 100644 index 0000000..cc0b004 --- /dev/null +++ b/bin/main/config.yml @@ -0,0 +1,14 @@ + version: "${version}" + motd: "YAY, Super server!" + motd-reload: "Server reloading!" + + storage: "MONGODB" # switch between "MONGODB", "MYSQL"(not implemented), "YML"(currently making it) + # if MYSQL or MongoDB + username: "no_usr" # if mysql if you are on mongodb, add username in the url + password: "no_pass" # if mysql if you are on mongodb, add password in the url + url: "mongodb://localhost:27017" + + useResourcePack: false + resource_pack_url: "https://mc-packs.net/" # recommend to use https://mc-packs.net/ => free resource pack hoster (will eventually develop one myself but not atm) + resource_pack_sha1: "sha1hallo" # sha1 hash + debug: true \ No newline at end of file diff --git a/bin/main/plugin.yml b/bin/main/plugin.yml new file mode 100644 index 0000000..ce65f50 --- /dev/null +++ b/bin/main/plugin.yml @@ -0,0 +1,49 @@ +name: Raxen +version: '${version}' +main: gq.unurled.raxen.Raxen +author: unurled +api-version: 1.18 +depend: [ProtocolLib, PlaceholderAPI] +softdepend: [AureliumSkills, LuckPerms] + +commands: + reloadplugin: + aliases: + - rlpl + - reloadpl + description: reload command that stops the server. + skills: + aliases: + - skill + description: skill command. + testgui: + description: test gui command + storage: + description: acces player storage + nbt: + description: nbt command + raxen: + description: raxen main command + itemlist: + aliases: itl + description: Open ItemList menu + entityspawn: + description: Spawn an custom entity + class: + description: player command that make them choose their class and then their stats + +permissions: + raxen.reload.cmd: + description: reload command permission + raxen.test.gui.cmd: + description: testgui command permission + raxen.nbt.cmd: + description: nbt command permission + raxen.raxen.cmd: + description: raxen command permssion + raxen.itemlist.cmd: + description: itemlist command permission + raxen.entityspawn.cmd: + description: entityspawn command permission + raxen.class.cmd: + description: class command premission \ No newline at end of file diff --git a/src/main/java/gq/unurled/raxen/components/dungeons/Dungeon.java b/src/main/java/gq/unurled/raxen/components/dungeons/Dungeon.java new file mode 100644 index 0000000..b93f606 --- /dev/null +++ b/src/main/java/gq/unurled/raxen/components/dungeons/Dungeon.java @@ -0,0 +1,46 @@ +package gq.unurled.raxen.components.dungeons; + +import org.bukkit.Bukkit; +import org.bukkit.Location; + +import java.util.UUID; + +import static gq.unurled.raxen.utils.DungeonUtils.getRadiusFromRank; + +public class Dungeon { + + private UUID uuid; + + private Rank rank; + + private Gate gate; + + /** + * The Type of the Dungeon + */ + private Type type; + + private Location location; + private Integer radius; + + public Dungeon(UUID uuid, Rank rank, Type type) { + this.uuid = uuid; + this.rank = rank; + this.type = type; + } + + /** + * Generate the Gate and make it available to players in the world. + * TODO: Place the gate at a random place. + */ + public void generateGate() { + // -281.50 36.00 187.50 0.90 10.80 + Location loc = new Location(Bukkit.getWorld("Liberty_City"), -284.0, 36.00, 187.50); + Integer radius = getRadiusFromRank(this.rank); + this.gate = new Gate(uuid, loc, radius); + } + + public void generate() { + + } +} diff --git a/src/main/java/gq/unurled/raxen/components/dungeons/Gate.java b/src/main/java/gq/unurled/raxen/components/dungeons/Gate.java new file mode 100644 index 0000000..76b49e8 --- /dev/null +++ b/src/main/java/gq/unurled/raxen/components/dungeons/Gate.java @@ -0,0 +1,38 @@ +package gq.unurled.raxen.components.dungeons; + +import org.bukkit.Location; + +import java.util.UUID; + +public class Gate { + + private UUID uuid; + + + private Location loc; + private Integer portalRadius; + + + public Gate(UUID uuid, Location loc, Integer portalRadius) { + this.loc = loc; + this.portalRadius = portalRadius; + this.uuid = uuid; + } + + public void teleport() { + + } + + + public Location getLoc() { + return loc; + } + + public Integer getPortalRadius() { + return portalRadius; + } + + public UUID getUuid() { + return uuid; + } +} diff --git a/src/main/java/gq/unurled/raxen/components/dungeons/Rank.java b/src/main/java/gq/unurled/raxen/components/dungeons/Rank.java new file mode 100644 index 0000000..a7be70a --- /dev/null +++ b/src/main/java/gq/unurled/raxen/components/dungeons/Rank.java @@ -0,0 +1,16 @@ +package gq.unurled.raxen.components.dungeons; + +public enum Rank { + F, + E, + D, + C, + B, + A, + S, + SS, + SSS, + WORLD, + UNBEATABLE, + NOT_DEFINED +} diff --git a/src/main/java/gq/unurled/raxen/components/dungeons/Type.java b/src/main/java/gq/unurled/raxen/components/dungeons/Type.java new file mode 100644 index 0000000..dfc1022 --- /dev/null +++ b/src/main/java/gq/unurled/raxen/components/dungeons/Type.java @@ -0,0 +1,20 @@ +package gq.unurled.raxen.components.dungeons; + +public enum Type { + JUNGLE, + TROPICAL_JUNGLE, + PLAINS, + GRAVES, + CASTLE, + ABANDONED_CASTLE, + FIELD, + ICE_FOREST, + FOREST, + VOLCANO, + MOUNTAINS, + HIGH_MOUNTAINS, + CAVES, + LABYRINTH, + UNDERGROUND_LABYRINTH, + FOREST_LABYRINTH +} diff --git a/src/main/java/gq/unurled/raxen/manager/server/DungeonsManager.java b/src/main/java/gq/unurled/raxen/manager/server/DungeonsManager.java new file mode 100644 index 0000000..d4a8838 --- /dev/null +++ b/src/main/java/gq/unurled/raxen/manager/server/DungeonsManager.java @@ -0,0 +1,11 @@ +package gq.unurled.raxen.manager.server; + +import gq.unurled.raxen.components.dungeons.Gate; + +import java.util.HashMap; +import java.util.UUID; + +public class DungeonsManager { + + private HashMap gates = new HashMap<>(); +} diff --git a/src/main/java/gq/unurled/raxen/utils/DungeonUtils.java b/src/main/java/gq/unurled/raxen/utils/DungeonUtils.java new file mode 100644 index 0000000..af2c6a3 --- /dev/null +++ b/src/main/java/gq/unurled/raxen/utils/DungeonUtils.java @@ -0,0 +1,37 @@ +package gq.unurled.raxen.utils; + +import gq.unurled.raxen.components.dungeons.Rank; + +public class DungeonUtils { + + public static Integer getRadiusFromRank(Rank rank) { + Integer radius = 1; + switch (rank) { + case F: + radius = 4; + case E: + radius = 5; + case D: + radius = 8; + case C: + radius = 10; + case B: + radius = 15; + case A: + radius = 20; + case S: + radius = 30; + case SS: + radius = 40; + case SSS: + radius = 50; + case WORLD: + radius = 100; + case UNBEATABLE: + radius = 200; + case NOT_DEFINED: + radius = 1000; + } + return radius; + } +} diff --git a/src/main/resources/Class/Swordsmann.yml b/src/main/resources/Class/Swordsmann.yml deleted file mode 100644 index 9c5bc23..0000000 --- a/src/main/resources/Class/Swordsmann.yml +++ /dev/null @@ -1,5 +0,0 @@ -id: "SWORDSMANN" -name: "Swordsmann" -color-name: "Swordsmann" -item_placeholder: "DIAMOND_SWORD" -max_level: 10 diff --git a/src/main/resources/Worlds/example_worlds.yml b/src/main/resources/Worlds/example_worlds.yml deleted file mode 100644 index 15b1a6e..0000000 --- a/src/main/resources/Worlds/example_worlds.yml +++ /dev/null @@ -1,2 +0,0 @@ -name: "HALLO" -uuid: "uuid" \ No newline at end of file diff --git a/src/main/resources/example_item.yml b/src/main/resources/example_item.yml deleted file mode 100644 index 2e21a8e..0000000 --- a/src/main/resources/example_item.yml +++ /dev/null @@ -1,17 +0,0 @@ -id: "RED_WOOL" -customId: "BEST_NEW_ITEM" -name: "best Item name ever" -health: 100 -defense: 50 -speed: 100 -strength: 100 -custom_ability: "fireball" -isGlowing: true -isUnbreakable: true -Pack: - parent: "item/generated" - custom_model_data: 123 - model: "red_wool" -drop_rate: 100.0 -lore: - - 'Super lore' \ No newline at end of file diff --git a/src/main/resources/example_mob.yml b/src/main/resources/example_mob.yml deleted file mode 100644 index 6e8e9ea..0000000 --- a/src/main/resources/example_mob.yml +++ /dev/null @@ -1,31 +0,0 @@ -world: world -display_name: 'Lvl: {level} {name} ❤{hp}/❤{hp_max}' -name: 'example mob' -base_mob: ZOMBIE -ID: EXAMPLE_MOB -level: - 1-10: - hp_max: 100*{level} - speed: 100+({level}/10) - strength: 10*{level} - defense: 0 - 11-20: - hp_max: 200*{level} - speed: 100+({level}/10) - strength: 10*{level} - defense: 0 - 21-30: - hp_max: 200*{level} - speed: 100+({level}/10) - strength: 10*{level} - defense: 0 - 31-40: - hp_max: 200*{level} - speed: 100+({level}/10) - strength: 10*{level} - defense: 0 - 41-50: - hp_max: 200*{level} - speed: 100+({level}/10) - strength: 10*{level} - defense: 0 \ No newline at end of file diff --git a/src/main/resources/gate.yml b/src/main/resources/gate.yml deleted file mode 100644 index 859ac68..0000000 --- a/src/main/resources/gate.yml +++ /dev/null @@ -1,15 +0,0 @@ -gates: - 1: - id: 1 - world_source: "world" - x1: 100 - y1: 100 - z1: 100 - x2: 103 - y2: 103 - z2: 103 - name: "hallo" - world_dest: "world" - dest_x: 110 - dest_y: 110 - dest_z: 110