Second Build
This commit is contained in:
parent
6da37ac201
commit
a1d28783de
6 changed files with 63 additions and 0 deletions
4
README.md
Normal file
4
README.md
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
# ZalmikLobby
|
||||||
|
## Lobby Plugin für Zalmik.de Minecraft Netzwerk
|
||||||
|
### Author: Tronax
|
||||||
|
### Website: https://tronax.xyz
|
||||||
|
|
@ -14,6 +14,8 @@ public final class Main extends JavaPlugin {
|
||||||
public static ArrayList<String> build = new ArrayList<String>();
|
public static ArrayList<String> build = new ArrayList<String>();
|
||||||
public static ArrayList<String> flymode = new ArrayList<String>();
|
public static ArrayList<String> flymode = new ArrayList<String>();
|
||||||
|
|
||||||
|
public static ArrayList<String> godmode = new ArrayList<String>();
|
||||||
|
|
||||||
|
|
||||||
public static String line = "§8§l<>---------< §e§lLobby §8§l>---------<>";
|
public static String line = "§8§l<>---------< §e§lLobby §8§l>---------<>";
|
||||||
public static String prefix = "§3Zalmik §8|";
|
public static String prefix = "§3Zalmik §8|";
|
||||||
|
|
@ -47,6 +49,7 @@ public final class Main extends JavaPlugin {
|
||||||
registerCMD("clearchat", new CMD_chatclear());
|
registerCMD("clearchat", new CMD_chatclear());
|
||||||
registerCMD("spawn", new CMD_spawn());
|
registerCMD("spawn", new CMD_spawn());
|
||||||
registerCMD("setspawn", new CMD_setspawn());
|
registerCMD("setspawn", new CMD_setspawn());
|
||||||
|
registerCMD("godmode", new CMD_godmode());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
package xyz.tronax.zalmiklobby.commands;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import xyz.tronax.zalmiklobby.Main;
|
||||||
|
|
||||||
|
public class CMD_godmode implements CommandExecutor {
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||||
|
if(!(sender instanceof Player)) {
|
||||||
|
sender.sendMessage(Main.prefix + " §cDu bist kein Spieler!");
|
||||||
|
} else {
|
||||||
|
Player p = (Player) sender;
|
||||||
|
if(p.hasPermission("lobby.god")) {
|
||||||
|
if(Main.godmode.contains(p.getName())) {
|
||||||
|
p.sendMessage(Main.prefix + " §cDer Unsterblichkeitsmodus wurde deaktiviert!");
|
||||||
|
p.setInvulnerable(true);
|
||||||
|
Main.godmode.remove(p.getName());
|
||||||
|
} else {
|
||||||
|
p.sendMessage(Main.prefix + " §aDer Unsterblichkeitsmodus wurde aktiviert!");
|
||||||
|
p.setInvulnerable(false);
|
||||||
|
Main.godmode.add(p.getName());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
p.sendMessage(Main.noperm);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
|
|
@ -1,4 +1,26 @@
|
||||||
name: ZalmikLobby
|
name: ZalmikLobby
|
||||||
version: '1.0-SNAPSHOT'
|
version: '1.0-SNAPSHOT'
|
||||||
|
author: TronaxYT
|
||||||
main: xyz.tronax.zalmiklobby.Main
|
main: xyz.tronax.zalmiklobby.Main
|
||||||
api-version: '1.20'
|
api-version: '1.20'
|
||||||
|
commands:
|
||||||
|
build:
|
||||||
|
description: Toggled den Build Modus.
|
||||||
|
ping:
|
||||||
|
description: Zeigt den Ping an.
|
||||||
|
ip:
|
||||||
|
description: Zeigt die IP an.
|
||||||
|
fly:
|
||||||
|
description: Toggled den Flugmodus.
|
||||||
|
aliases:
|
||||||
|
- flugmodus
|
||||||
|
- flug
|
||||||
|
clearchat:
|
||||||
|
description: Cleart den Chat.
|
||||||
|
aliases:
|
||||||
|
- cc
|
||||||
|
- chatclear
|
||||||
|
setspawn:
|
||||||
|
description: Setzt den Spawn.
|
||||||
|
spawn:
|
||||||
|
description: TP zum Spawn.
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue