mirror of
https://github.com/trainerlord/WorldSystem.git
synced 2024-06-24 10:04:45 +02:00
Added first 1.15 support. More testing has to be done by the users
This commit is contained in:
parent
82fe13d427
commit
32e6ba3c50
2
pom.xml
2
pom.xml
|
@ -122,7 +122,7 @@
|
|||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
<version>1.14-R0.1-SNAPSHOT</version>
|
||||
<version>1.15-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
|
|
@ -96,10 +96,6 @@ public class WorldSystem extends JavaPlugin {
|
|||
return JavaPlugin.getPlugin(WorldSystem.class);
|
||||
}
|
||||
|
||||
public static boolean is1_13() {
|
||||
return is1_13Plus;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
// Set right version
|
||||
|
|
|
@ -2,6 +2,7 @@ package de.butzlabben.world.config;
|
|||
|
||||
import de.butzlabben.inventory.OrcItem;
|
||||
import de.butzlabben.world.WorldSystem;
|
||||
import de.butzlabben.world.util.VersionUtil;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
|
@ -27,7 +28,9 @@ public class GuiConfig {
|
|||
if (!file.exists()) {
|
||||
try {
|
||||
String guiFileResource;
|
||||
if (WorldSystem.is1_13()) {
|
||||
if (VersionUtil.getVersion() >= 14) {
|
||||
guiFileResource = "1_14_gui.yml";
|
||||
} else if (VersionUtil.getVersion() == 13) {
|
||||
guiFileResource = "1_13_gui.yml";
|
||||
} else {
|
||||
guiFileResource = "old_gui.yml";
|
||||
|
|
|
@ -18,7 +18,9 @@ public class VersionUtil {
|
|||
if (version == 0) {
|
||||
// Detect version
|
||||
String v = Bukkit.getVersion();
|
||||
if (v.contains("1.14"))
|
||||
if (v.contains("1.15"))
|
||||
version = 15;
|
||||
else if (v.contains("1.14"))
|
||||
version = 14;
|
||||
else if (v.contains("1.13"))
|
||||
version = 13;
|
||||
|
|
299
src/main/resources/1_14_gui.yml
Normal file
299
src/main/resources/1_14_gui.yml
Normal file
|
@ -0,0 +1,299 @@
|
|||
#
|
||||
# Config for the GUI "/gui"
|
||||
# Counting for rows and columns starts always at 1
|
||||
#
|
||||
|
||||
options:
|
||||
# How the enabled item should look like
|
||||
enabled:
|
||||
# Material name in the Material enum
|
||||
material: LIME_DYE
|
||||
# Displayname
|
||||
display: '&aEnabled'
|
||||
|
||||
# How the disabled item should look like
|
||||
disabled:
|
||||
material: RED_DYE
|
||||
display: '&cDisabled'
|
||||
|
||||
# How the comming-soon item should look like
|
||||
coming_soon:
|
||||
material: ORANGE_DYE
|
||||
display: '&6Coming soon...'
|
||||
|
||||
# How the back item should look like
|
||||
back:
|
||||
material: BARRIER
|
||||
display: '&cBack'
|
||||
|
||||
# When filling of an inventory is true, how the item should look like
|
||||
fill:
|
||||
material: GRAY_STAINED_GLASS_PANE
|
||||
display: ''
|
||||
|
||||
# WorldoptionsGUI
|
||||
world:
|
||||
fill: false
|
||||
# What the title of the Inv should be
|
||||
title: 'World Options'
|
||||
|
||||
# Rows
|
||||
rows: 3
|
||||
|
||||
# Where the back item should be
|
||||
back:
|
||||
enabled: true
|
||||
slot:
|
||||
row: 3
|
||||
col: 5
|
||||
|
||||
# Reset button
|
||||
reset:
|
||||
# If feature should be enabled or not
|
||||
enabled: true
|
||||
slot:
|
||||
row: 1
|
||||
col: 8
|
||||
material: DIAMOND_HOE
|
||||
data: 0
|
||||
display: '&eReset World'
|
||||
|
||||
# Fire button
|
||||
fire:
|
||||
enabled: true
|
||||
slot:
|
||||
row: 1
|
||||
col: 2
|
||||
# Where the state item should be
|
||||
state:
|
||||
row: 2
|
||||
col: 2
|
||||
material: FLINT_AND_STEEL
|
||||
display: '&eToggle Fire'
|
||||
|
||||
# TNT button
|
||||
tnt:
|
||||
enabled: true
|
||||
slot:
|
||||
row: 1
|
||||
col: 5
|
||||
state:
|
||||
row: 2
|
||||
col: 5
|
||||
material: TNT
|
||||
display: '&eToggle TNT-Explosion'
|
||||
|
||||
players:
|
||||
title: 'Players added to this world'
|
||||
|
||||
back:
|
||||
enabled: true
|
||||
slot:
|
||||
row: 6
|
||||
col: 6
|
||||
|
||||
rows: 6
|
||||
|
||||
nextpage:
|
||||
enabled: true
|
||||
slot:
|
||||
row: 6
|
||||
col: 8
|
||||
material: PAPER
|
||||
display: '&eNext Page'
|
||||
pagebefore:
|
||||
enabled: true
|
||||
slot:
|
||||
row: 6
|
||||
col: 2
|
||||
material: PAPER
|
||||
display: '&ePage before'
|
||||
currentpage:
|
||||
enabled: true
|
||||
slot:
|
||||
row: 6
|
||||
col: 4
|
||||
material: SUNFLOWER
|
||||
display: '&eCurrent page: &a%page'
|
||||
|
||||
playerhead:
|
||||
material: PLAYER_HEAD
|
||||
display: '&e%player'
|
||||
|
||||
# PlayerGUI for managing one player on a world
|
||||
player:
|
||||
fill: false
|
||||
title: 'Player options for %player'
|
||||
|
||||
back:
|
||||
slot:
|
||||
enabled: true
|
||||
row: 3
|
||||
col: 5
|
||||
|
||||
rows: 3
|
||||
|
||||
build:
|
||||
enabled: true
|
||||
slot:
|
||||
row: 1
|
||||
col: 1
|
||||
state:
|
||||
row: 2
|
||||
col: 1
|
||||
material: GOLDEN_AXE
|
||||
display: '&eToggle Build-Permission'
|
||||
lore:
|
||||
- '&7Toggles the permission for a player'
|
||||
- '&7To build on this world'
|
||||
gamemode:
|
||||
enabled: true
|
||||
slot:
|
||||
row: 1
|
||||
col: 2
|
||||
state:
|
||||
row: 2
|
||||
col: 2
|
||||
material: END_CRYSTAL
|
||||
display: '&eToggle GameMode-Permission'
|
||||
lore:
|
||||
- '&7Toggles the permission for a player'
|
||||
- '&7To change the GameMode on this world'
|
||||
teleport:
|
||||
enabled: true
|
||||
slot:
|
||||
row: 1
|
||||
col: 3
|
||||
state:
|
||||
row: 2
|
||||
col: 3
|
||||
material: COMPASS
|
||||
display: '&eToggle Teleport-Permission'
|
||||
lore:
|
||||
- '&7Toggles the permission for a player'
|
||||
- '&7To teleport on this world'
|
||||
worldedit:
|
||||
enabled: true
|
||||
slot:
|
||||
row: 1
|
||||
col: 4
|
||||
state:
|
||||
row: 2
|
||||
col: 4
|
||||
material: WOODEN_AXE
|
||||
display: '&eToggle WorldEdit-Permission'
|
||||
lore:
|
||||
- '&7Toggles the permission for a player'
|
||||
- '&7To use WorldEdit on this world'
|
||||
addmember:
|
||||
enabled: false
|
||||
slot:
|
||||
row: 1
|
||||
col: 6
|
||||
state:
|
||||
row: 2
|
||||
col: 6
|
||||
material: 399
|
||||
display: '&eToggle Addmember-Permission'
|
||||
lore:
|
||||
- '&7Toggles the permission for a player'
|
||||
- '&7To add a member to this world'
|
||||
delmember:
|
||||
enabled: false
|
||||
slot:
|
||||
row: 1
|
||||
col: 6
|
||||
state:
|
||||
row: 2
|
||||
col: 6
|
||||
material: 286
|
||||
display: '&eToggle Delmember-Permission'
|
||||
lore:
|
||||
- '&7Toggles the permission for a player'
|
||||
- '&7To remove a member from this world'
|
||||
setpermissions:
|
||||
enabled: false
|
||||
slot:
|
||||
row: 1
|
||||
col: 8
|
||||
state:
|
||||
row: 2
|
||||
col: 8
|
||||
material: 331
|
||||
display: '&eToggle Setpermissions-Permission'
|
||||
lore:
|
||||
- '&7Toggles the permission for a player'
|
||||
- '&7To set permissions for a member of this world'
|
||||
administrateworld:
|
||||
enabled: false
|
||||
slot:
|
||||
row: 1
|
||||
col: 9
|
||||
state:
|
||||
row: 2
|
||||
col: 9
|
||||
material: 421
|
||||
display: '&eToggle Addmember-Permission'
|
||||
lore:
|
||||
- '&7Toggles the permission for a player'
|
||||
- '&7To adminstrate this world'
|
||||
|
||||
# WorldsystemGUI
|
||||
worldsystem:
|
||||
fill: false
|
||||
title: 'WorldSystem'
|
||||
|
||||
rows: 1
|
||||
|
||||
back:
|
||||
slot:
|
||||
enabled: true
|
||||
row: 1
|
||||
col: 5
|
||||
|
||||
playeroptions:
|
||||
enabled: true
|
||||
slot:
|
||||
row: 1
|
||||
col: 1
|
||||
material: LEATHER_HELMET
|
||||
display: '&ePlayer Options'
|
||||
worldoptions:
|
||||
enabled: true
|
||||
slot:
|
||||
row: 1
|
||||
col: 9
|
||||
material: GRASS_BLOCK
|
||||
display: '&eWorld Options'
|
||||
|
||||
# GUI for choosing world template
|
||||
worldchoose:
|
||||
fill: false
|
||||
title: 'Choose world template'
|
||||
|
||||
back:
|
||||
enabled: true
|
||||
slot:
|
||||
row: 4
|
||||
col: 5
|
||||
|
||||
rows: 4
|
||||
|
||||
# The key must be named exactly as in the config.yml
|
||||
template_default:
|
||||
enabled: true
|
||||
slot:
|
||||
row: 2
|
||||
col: 3
|
||||
material: GRASS_BLOCK
|
||||
display: '&aDefault template'
|
||||
|
||||
another_template:
|
||||
enabled: true
|
||||
slot:
|
||||
row: 2
|
||||
col: 7
|
||||
material: STONE
|
||||
display: '&aAnother template'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user