mirror of
https://github.com/trainerlord/WorldSystem.git
synced 2024-12-02 13:23:21 +01:00
2.1.2 see spigotmc.org
This commit is contained in:
parent
8a875e3a55
commit
b1f1d1c313
@ -1,11 +1,11 @@
|
|||||||
nopermission: "&cYou don't have permissions!"
|
nopermission: "&cYou do not have permission to that command!"
|
||||||
unknown_error: "&cSomething went wrong..."
|
unknown_error: "&cSomething went wrong..."
|
||||||
lagdetection: "Lagdetection in world: &c%world"
|
lagdetection: "Lagdetection in world: &c%world"
|
||||||
wrong_usage: "&c%usage"
|
wrong_usage: "&c%usage"
|
||||||
not_registered: "&cThis player hasn't joined yet!"
|
not_registered: "&cThis player hasn't joined yet!"
|
||||||
|
|
||||||
world:
|
world:
|
||||||
reseted: "Your world was reseted!"
|
reseted: "You would was reset!"
|
||||||
still_loaded: "&cYour world is still loaded!"
|
still_loaded: "&cYour world is still loaded!"
|
||||||
not_on: "&cYou are not on a world!"
|
not_on: "&cYou are not on a world!"
|
||||||
created: "Your world is now ready. Get there with &a/ws home"
|
created: "Your world is now ready. Get there with &a/ws home"
|
||||||
@ -16,8 +16,8 @@ world:
|
|||||||
does_not_exists:
|
does_not_exists:
|
||||||
own: "&cYou don't have a world!"
|
own: "&cYou don't have a world!"
|
||||||
other: "&cThis player doesn't has a world!"
|
other: "&cThis player doesn't has a world!"
|
||||||
setting_up: "&aSetting up world..."
|
setting_up: "&aLoading world..."
|
||||||
playerlist: "Player in this world: %players"
|
playerlist: "Players in this world: %players"
|
||||||
|
|
||||||
member:
|
member:
|
||||||
removed: "You removed &c%player&6 from your world!"
|
removed: "You removed &c%player&6 from your world!"
|
||||||
@ -25,20 +25,20 @@ member:
|
|||||||
already_added: "&cThis player is already a member!"
|
already_added: "&cThis player is already a member!"
|
||||||
not_added:
|
not_added:
|
||||||
own: "&cThis player isn't a member!"
|
own: "&cThis player isn't a member!"
|
||||||
other: "&cYou are not added to this world"
|
other: "&cYou have not been added to this world!"
|
||||||
|
|
||||||
request:
|
request:
|
||||||
expired: "&cYou request is expired!"
|
expired: "&cYour request has expired!"
|
||||||
confirm: "&cPlease confirm reset of your world: %command"
|
confirm: "WARNING - Please confirm reset of your world: %command"
|
||||||
until_expire: "&cYour request expires in %time seconds!"
|
until_expire: "&cYour request expires in %time seconds!"
|
||||||
already_sent: "&cYou already sent a request!"
|
already_sent: "&cYou already sent a request!"
|
||||||
not_sent: "&cYou didn't send a request!"
|
not_sent: "&cYou have not sent a request!"
|
||||||
invalid_input: "&c%input is not a valid input!"
|
invalid_input: "&c%input is not a valid request!"
|
||||||
|
|
||||||
toggle:
|
toggle:
|
||||||
gamemode:
|
gamemode:
|
||||||
enabled: "&a%player&6 can now change his gamemode!"
|
enabled: "&a%player&6 can now change their gamemode!"
|
||||||
disabled: "&c%player&6 can no longer change his gamemode!"
|
disabled: "&c%player&6 can no longer change their gamemode!"
|
||||||
teleport:
|
teleport:
|
||||||
enabled: "&a%player&6 can now teleport!"
|
enabled: "&a%player&6 can now teleport!"
|
||||||
disabled: "&c%player&6 can no longer teleport!"
|
disabled: "&c%player&6 can no longer teleport!"
|
||||||
@ -65,16 +65,16 @@ command_help:
|
|||||||
list:
|
list:
|
||||||
- "/ws get &8- &7Will give you a world"
|
- "/ws get &8- &7Will give you a world"
|
||||||
- "/ws home &8- &7Teleports you on your world"
|
- "/ws home &8- &7Teleports you on your world"
|
||||||
- "/ws gui &8- &7Opens the GUI menu if you are the worldowner"
|
- "/ws gui &8- &7Opens the GUI menu if you are the world owner"
|
||||||
- "/ws tp &8- &7Teleports you on a specific world"
|
- "/ws tp &8- &7Teleports you on a specific world"
|
||||||
- "/ws addmember &8- &7Adds a player to your world"
|
- "/ws addmember &8- &7Adds a player to your world"
|
||||||
- "/ws delmember &8- &7Removes a player from your world"
|
- "/ws delmember &8- &7Removes a player from your world"
|
||||||
- "/ws leave &8- &7Leave a world"
|
- "/ws leave &8- &7Leave a world"
|
||||||
- "/ws tnt &8- &7Allows/Denys TNT on your world"
|
- "/ws tnt &8- &7Allows/Denies TNT on your world"
|
||||||
- "/ws fire &8- &7Allows/Denys Fire on your world"
|
- "/ws fire &8- &7Allows/Denies Fire on your world"
|
||||||
- "/ws togglegm &8- &7Allows/Denys a player changing gamemode"
|
- "/ws togglegm &8- &7Allows/Denies a player changing gamemode"
|
||||||
- "/ws togglebuild &8- &7Allows/Denys a player building"
|
- "/ws togglebuild &8- &7Allows/Denies a player building on your world"
|
||||||
- "/ws toggletp &8- &7Allows/Denys a player teleporting"
|
- "/ws toggletp &8- &7Allows/Denies a player teleporting on your world"
|
||||||
- "/ws info &8- &7Shows information about the world"
|
- "/ws info &8- &7Shows information about the world"
|
||||||
- "/ws reset &8- &7Will reset your world"
|
- "/ws reset &8- &7Will reset your world"
|
||||||
delete_command: "/ws delete &8- &7Will delete a world"
|
delete_command: "/ws delete &8- &7Will delete a world"
|
@ -1,5 +1,5 @@
|
|||||||
name: WorldSystem
|
name: WorldSystem
|
||||||
version: 2.1.1
|
version: 2.1.2
|
||||||
author: Butzlabben
|
author: Butzlabben
|
||||||
main: de.butzlabben.world.WorldSystem
|
main: de.butzlabben.world.WorldSystem
|
||||||
|
|
||||||
@ -9,6 +9,7 @@ commands:
|
|||||||
usage: /ws
|
usage: /ws
|
||||||
ws get:
|
ws get:
|
||||||
usage: /ws get
|
usage: /ws get
|
||||||
|
permission: ws.get
|
||||||
ws help:
|
ws help:
|
||||||
usage: /ws help
|
usage: /ws help
|
||||||
ws home:
|
ws home:
|
||||||
@ -50,6 +51,7 @@ permissions:
|
|||||||
description: Gives '*'-Perms to all Commands
|
description: Gives '*'-Perms to all Commands
|
||||||
children:
|
children:
|
||||||
ws.tp.*: true
|
ws.tp.*: true
|
||||||
|
ws.get: true
|
||||||
ws.tp.world: true
|
ws.tp.world: true
|
||||||
ws.tp.toother: true
|
ws.tp.toother: true
|
||||||
ws.tp.other: true
|
ws.tp.other: true
|
||||||
@ -70,6 +72,9 @@ permissions:
|
|||||||
ws.build:
|
ws.build:
|
||||||
default: op
|
default: op
|
||||||
description: You can build on other Worlds without WorldPermissions
|
description: You can build on other Worlds without WorldPermissions
|
||||||
|
ws.get:
|
||||||
|
default: true
|
||||||
|
description: You can create a world via /ws get
|
||||||
ws.delete:
|
ws.delete:
|
||||||
default: op
|
default: op
|
||||||
description: You can delete a world
|
description: You can delete a world
|
||||||
|
@ -9,7 +9,7 @@ worldborder:
|
|||||||
# Size with ws.large permission
|
# Size with ws.large permission
|
||||||
large: 5000
|
large: 5000
|
||||||
|
|
||||||
# Set a specialized center wich is not the spawn
|
# Set a specialized center which is not the spawn
|
||||||
center:
|
center:
|
||||||
as_spawn: true
|
as_spawn: true
|
||||||
x: 0
|
x: 0
|
||||||
|
@ -9,6 +9,8 @@ import java.nio.charset.Charset;
|
|||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.GsonBuilder;
|
import com.google.gson.GsonBuilder;
|
||||||
|
|
||||||
|
import de.butzlabben.world.WorldSystem;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Butzlabben
|
* @author Butzlabben
|
||||||
* @since 02.05.2018
|
* @since 02.05.2018
|
||||||
@ -19,7 +21,7 @@ public class UpdateInformations {
|
|||||||
private final boolean silent;
|
private final boolean silent;
|
||||||
|
|
||||||
public static synchronized UpdateInformations getInformations() {
|
public static synchronized UpdateInformations getInformations() {
|
||||||
String json = callURL("https://seagiants.eu/worldsystem/info.php");
|
String json = callURL("https://seagiants.eu/worldsystem/info.php?version=" + WorldSystem.getInstance().getDescription().getVersion());
|
||||||
Gson gson = new GsonBuilder().create();
|
Gson gson = new GsonBuilder().create();
|
||||||
UpdateInformations ui = gson.fromJson(json, UpdateInformations.class);
|
UpdateInformations ui = gson.fromJson(json, UpdateInformations.class);
|
||||||
return ui;
|
return ui;
|
||||||
|
@ -173,6 +173,7 @@ public class WorldSystem extends JavaPlugin {
|
|||||||
if (languages.exists() == false)
|
if (languages.exists() == false)
|
||||||
languages.mkdirs();
|
languages.mkdirs();
|
||||||
PluginConfig.checkConfig(config);
|
PluginConfig.checkConfig(config);
|
||||||
|
// Done with #6
|
||||||
MessageConfig.checkConfig(new File(languages, "en.yml"));
|
MessageConfig.checkConfig(new File(languages, "en.yml"));
|
||||||
MessageConfig.checkConfig(new File(languages, "de.yml"));
|
MessageConfig.checkConfig(new File(languages, "de.yml"));
|
||||||
MessageConfig.checkConfig(new File(languages, "hu.yml"));
|
MessageConfig.checkConfig(new File(languages, "hu.yml"));
|
||||||
|
@ -37,7 +37,7 @@ public class WSAddmemberCommand implements CommandExecutor{
|
|||||||
OfflinePlayer a = Bukkit.getOfflinePlayer(args[1]);
|
OfflinePlayer a = Bukkit.getOfflinePlayer(args[1]);
|
||||||
WorldConfig wc = WorldConfig.getWorldConfig(dc.getWorldname());
|
WorldConfig wc = WorldConfig.getWorldConfig(dc.getWorldname());
|
||||||
if (a == null) {
|
if (a == null) {
|
||||||
p.sendMessage(MessageConfig.getNotRegistered());
|
p.sendMessage(MessageConfig.getNotRegistered().replaceAll("%player", args[1]));
|
||||||
return true;
|
return true;
|
||||||
} else if (wc.isMember(a.getUniqueId())) {
|
} else if (wc.isMember(a.getUniqueId())) {
|
||||||
p.sendMessage(MessageConfig.getAlreadyMember());
|
p.sendMessage(MessageConfig.getAlreadyMember());
|
||||||
|
@ -37,7 +37,7 @@ public class WSDelmemberCommand implements CommandExecutor {
|
|||||||
OfflinePlayer a = Bukkit.getOfflinePlayer(args[1]);
|
OfflinePlayer a = Bukkit.getOfflinePlayer(args[1]);
|
||||||
WorldConfig wc = WorldConfig.getWorldConfig(dc.getWorldname());
|
WorldConfig wc = WorldConfig.getWorldConfig(dc.getWorldname());
|
||||||
if (a == null) {
|
if (a == null) {
|
||||||
p.sendMessage(MessageConfig.getNotRegistered());
|
p.sendMessage(MessageConfig.getNotRegistered().replaceAll("%player", args[1]));
|
||||||
return true;
|
return true;
|
||||||
} else if (!wc.isMember(a.getUniqueId())) {
|
} else if (!wc.isMember(a.getUniqueId())) {
|
||||||
p.sendMessage(MessageConfig.getNoMemberOwn());
|
p.sendMessage(MessageConfig.getNoMemberOwn());
|
||||||
|
@ -1,8 +1,12 @@
|
|||||||
package de.butzlabben.world.config;
|
package de.butzlabben.world.config;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.FileNotFoundException;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.nio.charset.Charset;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.StandardCopyOption;
|
import java.nio.file.StandardCopyOption;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
@ -86,7 +90,12 @@ public class PluginConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static YamlConfiguration getConfig() {
|
private static YamlConfiguration getConfig() {
|
||||||
return YamlConfiguration.loadConfiguration(file);
|
try {
|
||||||
|
return YamlConfiguration.loadConfiguration(new InputStreamReader(new FileInputStream(file), Charset.forName("UTF-8")));
|
||||||
|
} catch (FileNotFoundException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getLicenseKey() {
|
public static String getLicenseKey() {
|
||||||
|
@ -18,6 +18,10 @@ public class GuiCommand implements CommandExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
WorldPlayer wp = new WorldPlayer((Player) sender);
|
WorldPlayer wp = new WorldPlayer((Player) sender);
|
||||||
|
if(!wp.isOnSystemWorld()) {
|
||||||
|
sender.sendMessage(MessageConfig.getNotOnWorld());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (!wp.isOwnerofWorld()) {
|
if (!wp.isOwnerofWorld()) {
|
||||||
sender.sendMessage(MessageConfig.getNoPermission());
|
sender.sendMessage(MessageConfig.getNoPermission());
|
||||||
return true;
|
return true;
|
||||||
|
@ -242,7 +242,7 @@ public class SystemWorld {
|
|||||||
DependenceConfig dc = new DependenceConfig(p);
|
DependenceConfig dc = new DependenceConfig(p);
|
||||||
|
|
||||||
String uuid = p.getUniqueId().toString();
|
String uuid = p.getUniqueId().toString();
|
||||||
int id = dc.getHighestID();
|
int id = dc.getHighestID() + 1;
|
||||||
String worldname = "ID" + id + "-" + uuid;
|
String worldname = "ID" + id + "-" + uuid;
|
||||||
|
|
||||||
WorldCreator creator = new WorldCreator(worldname);
|
WorldCreator creator = new WorldCreator(worldname);
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
nopermission: "&cYou don't have permissions!"
|
nopermission: "&cYou do not have permission to that command!"
|
||||||
unknown_error: "&cSomething went wrong..."
|
unknown_error: "&cSomething went wrong..."
|
||||||
lagdetection: "Lagdetection in world: &c%world"
|
lagdetection: "Lagdetection in world: &c%world"
|
||||||
wrong_usage: "&c%usage"
|
wrong_usage: "&c%usage"
|
||||||
not_registered: "&cThis player hasn't joined yet!"
|
not_registered: "&cThis player hasn't joined yet!"
|
||||||
|
|
||||||
world:
|
world:
|
||||||
reseted: "Your world was reseted!"
|
reseted: "You would was reset!"
|
||||||
still_loaded: "&cYour world is still loaded!"
|
still_loaded: "&cYour world is still loaded!"
|
||||||
not_on: "&cYou are not on a world!"
|
not_on: "&cYou are not on a world!"
|
||||||
created: "Your world is now ready. Get there with &a/ws home"
|
created: "Your world is now ready. Get there with &a/ws home"
|
||||||
@ -16,8 +16,8 @@ world:
|
|||||||
does_not_exists:
|
does_not_exists:
|
||||||
own: "&cYou don't have a world!"
|
own: "&cYou don't have a world!"
|
||||||
other: "&cThis player doesn't has a world!"
|
other: "&cThis player doesn't has a world!"
|
||||||
setting_up: "&aSetting up world..."
|
setting_up: "&aLoading world..."
|
||||||
playerlist: "Player in this world: %players"
|
playerlist: "Players in this world: %players"
|
||||||
|
|
||||||
member:
|
member:
|
||||||
removed: "You removed &c%player&6 from your world!"
|
removed: "You removed &c%player&6 from your world!"
|
||||||
@ -25,20 +25,20 @@ member:
|
|||||||
already_added: "&cThis player is already a member!"
|
already_added: "&cThis player is already a member!"
|
||||||
not_added:
|
not_added:
|
||||||
own: "&cThis player isn't a member!"
|
own: "&cThis player isn't a member!"
|
||||||
other: "&cYou are not added to this world"
|
other: "&cYou have not been added to this world!"
|
||||||
|
|
||||||
request:
|
request:
|
||||||
expired: "&cYou request is expired!"
|
expired: "&cYour request has expired!"
|
||||||
confirm: "&cPlease confirm reset of your world: %command"
|
confirm: "WARNING - Please confirm reset of your world: %command"
|
||||||
until_expire: "&cYour request expires in %time seconds!"
|
until_expire: "&cYour request expires in %time seconds!"
|
||||||
already_sent: "&cYou already sent a request!"
|
already_sent: "&cYou already sent a request!"
|
||||||
not_sent: "&cYou didn't send a request!"
|
not_sent: "&cYou have not sent a request!"
|
||||||
invalid_input: "&c%input is not a valid input!"
|
invalid_input: "&c%input is not a valid request!"
|
||||||
|
|
||||||
toggle:
|
toggle:
|
||||||
gamemode:
|
gamemode:
|
||||||
enabled: "&a%player&6 can now change his gamemode!"
|
enabled: "&a%player&6 can now change their gamemode!"
|
||||||
disabled: "&c%player&6 can no longer change his gamemode!"
|
disabled: "&c%player&6 can no longer change their gamemode!"
|
||||||
teleport:
|
teleport:
|
||||||
enabled: "&a%player&6 can now teleport!"
|
enabled: "&a%player&6 can now teleport!"
|
||||||
disabled: "&c%player&6 can no longer teleport!"
|
disabled: "&c%player&6 can no longer teleport!"
|
||||||
@ -65,16 +65,16 @@ command_help:
|
|||||||
list:
|
list:
|
||||||
- "/ws get &8- &7Will give you a world"
|
- "/ws get &8- &7Will give you a world"
|
||||||
- "/ws home &8- &7Teleports you on your world"
|
- "/ws home &8- &7Teleports you on your world"
|
||||||
- "/ws gui &8- &7Opens the GUI menu if you are the worldowner"
|
- "/ws gui &8- &7Opens the GUI menu if you are the world owner"
|
||||||
- "/ws tp &8- &7Teleports you on a specific world"
|
- "/ws tp &8- &7Teleports you on a specific world"
|
||||||
- "/ws addmember &8- &7Adds a player to your world"
|
- "/ws addmember &8- &7Adds a player to your world"
|
||||||
- "/ws delmember &8- &7Removes a player from your world"
|
- "/ws delmember &8- &7Removes a player from your world"
|
||||||
- "/ws leave &8- &7Leave a world"
|
- "/ws leave &8- &7Leave a world"
|
||||||
- "/ws tnt &8- &7Allows/Denys TNT on your world"
|
- "/ws tnt &8- &7Allows/Denies TNT on your world"
|
||||||
- "/ws fire &8- &7Allows/Denys Fire on your world"
|
- "/ws fire &8- &7Allows/Denies Fire on your world"
|
||||||
- "/ws togglegm &8- &7Allows/Denys a player changing gamemode"
|
- "/ws togglegm &8- &7Allows/Denies a player changing gamemode"
|
||||||
- "/ws togglebuild &8- &7Allows/Denys a player building"
|
- "/ws togglebuild &8- &7Allows/Denies a player building on your world"
|
||||||
- "/ws toggletp &8- &7Allows/Denys a player teleporting"
|
- "/ws toggletp &8- &7Allows/Denies a player teleporting on your world"
|
||||||
- "/ws info &8- &7Shows information about the world"
|
- "/ws info &8- &7Shows information about the world"
|
||||||
- "/ws reset &8- &7Will reset your world"
|
- "/ws reset &8- &7Will reset your world"
|
||||||
delete_command: "/ws delete &8- &7Will delete a world"
|
delete_command: "/ws delete &8- &7Will delete a world"
|
@ -1,5 +1,5 @@
|
|||||||
name: WorldSystem
|
name: WorldSystem
|
||||||
version: 2.1.1
|
version: 2.1.2
|
||||||
author: Butzlabben
|
author: Butzlabben
|
||||||
main: de.butzlabben.world.WorldSystem
|
main: de.butzlabben.world.WorldSystem
|
||||||
|
|
||||||
@ -9,6 +9,7 @@ commands:
|
|||||||
usage: /ws
|
usage: /ws
|
||||||
ws get:
|
ws get:
|
||||||
usage: /ws get
|
usage: /ws get
|
||||||
|
permission: ws.get
|
||||||
ws help:
|
ws help:
|
||||||
usage: /ws help
|
usage: /ws help
|
||||||
ws home:
|
ws home:
|
||||||
@ -50,6 +51,7 @@ permissions:
|
|||||||
description: Gives '*'-Perms to all Commands
|
description: Gives '*'-Perms to all Commands
|
||||||
children:
|
children:
|
||||||
ws.tp.*: true
|
ws.tp.*: true
|
||||||
|
ws.get: true
|
||||||
ws.tp.world: true
|
ws.tp.world: true
|
||||||
ws.tp.toother: true
|
ws.tp.toother: true
|
||||||
ws.tp.other: true
|
ws.tp.other: true
|
||||||
@ -70,6 +72,9 @@ permissions:
|
|||||||
ws.build:
|
ws.build:
|
||||||
default: op
|
default: op
|
||||||
description: You can build on other Worlds without WorldPermissions
|
description: You can build on other Worlds without WorldPermissions
|
||||||
|
ws.get:
|
||||||
|
default: true
|
||||||
|
description: You can create a world via /ws get
|
||||||
ws.delete:
|
ws.delete:
|
||||||
default: op
|
default: op
|
||||||
description: You can delete a world
|
description: You can delete a world
|
||||||
|
@ -9,7 +9,7 @@ worldborder:
|
|||||||
# Size with ws.large permission
|
# Size with ws.large permission
|
||||||
large: 5000
|
large: 5000
|
||||||
|
|
||||||
# Set a specialized center wich is not the spawn
|
# Set a specialized center which is not the spawn
|
||||||
center:
|
center:
|
||||||
as_spawn: true
|
as_spawn: true
|
||||||
x: 0
|
x: 0
|
||||||
|
Loading…
Reference in New Issue
Block a user