Start of dungeon work, custom item/mobs/gates not needed, gate and dungeons wil be made automatically.
This commit is contained in:
unurled 2022-04-05 22:11:30 +02:00
parent ce3c1d547c
commit 10c66d6fa4
13 changed files with 231 additions and 70 deletions

14
bin/main/config.yml Normal file
View file

@ -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

49
bin/main/plugin.yml Normal file
View file

@ -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

View file

@ -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() {
}
}

View file

@ -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;
}
}

View file

@ -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
}

View file

@ -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
}

View file

@ -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<UUID, Gate> gates = new HashMap<>();
}

View file

@ -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;
}
}

View file

@ -1,5 +0,0 @@
id: "SWORDSMANN"
name: "Swordsmann"
color-name: "<red>Swordsmann"
item_placeholder: "DIAMOND_SWORD"
max_level: 10

View file

@ -1,2 +0,0 @@
name: "HALLO"
uuid: "uuid"

View file

@ -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:
- '<red>Super lore'

View file

@ -1,31 +0,0 @@
world: world
display_name: '<white>Lvl: {level} {name} <red>❤{hp}</red>/<red>❤{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

View file

@ -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