Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
307036ac82
Commit
fc155f653d
@ -30,7 +30,6 @@ import de.steamwar.schematicsystem.SchematicSystem;
|
|||||||
import de.steamwar.sql.*;
|
import de.steamwar.sql.*;
|
||||||
import net.md_5.bungee.api.ChatColor;
|
import net.md_5.bungee.api.ChatColor;
|
||||||
import net.md_5.bungee.api.chat.ClickEvent;
|
import net.md_5.bungee.api.chat.ClickEvent;
|
||||||
import net.md_5.bungee.api.chat.ComponentBuilder;
|
|
||||||
import net.md_5.bungee.api.chat.HoverEvent;
|
import net.md_5.bungee.api.chat.HoverEvent;
|
||||||
import net.md_5.bungee.api.chat.TextComponent;
|
import net.md_5.bungee.api.chat.TextComponent;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@ -362,6 +361,12 @@ public class SchematicCommand extends SWCommand {
|
|||||||
SchematicCommandUtils.download(player, node);
|
SchematicCommandUtils.download(player, node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Register("lockreplay")
|
||||||
|
public void lockreplay(Player player, SchematicNode node) {
|
||||||
|
node.setAllowReplay(false);
|
||||||
|
player.sendMessage(SchematicSystem.PREFIX + "Replays von Kämpfen mit " + node.getName() + " können ab sofort nicht mehr betrachtet werden");
|
||||||
|
}
|
||||||
|
|
||||||
@Register("dir")
|
@Register("dir")
|
||||||
@Register("ordner")
|
@Register("ordner")
|
||||||
@Register("mkdir")
|
@Register("mkdir")
|
||||||
|
@ -407,23 +407,35 @@ public class SchematicCommandUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (extend == null) {
|
if (extend == null) {
|
||||||
SWInventory inv = new SWInventory(player, 9, "Schematic ausfahren");
|
submitSchemGUI(player, node, type);
|
||||||
inv.setItem(0, SWItem.getDye(10), (byte) 10, "§eSchematic ausfahren", click -> {
|
|
||||||
new PrepareSchemPacket(SteamwarUser.get(player.getUniqueId()), node, type).send(player);
|
|
||||||
player.sendMessage(SchematicSystem.PREFIX + "§aDer Vorbereitungsserver wird gestartet");
|
|
||||||
player.closeInventory();
|
|
||||||
});
|
|
||||||
inv.setItem(8, SWItem.getDye(7), (byte) 7, "§eDirekt einsenden", click -> {
|
|
||||||
node.setSchemtype(type.checkType());
|
|
||||||
player.sendMessage(SchematicSystem.PREFIX + "§aDie Schematic wird zeitnah überprüft");
|
|
||||||
player.closeInventory();
|
|
||||||
});
|
|
||||||
inv.setCallback(-999, click -> player.closeInventory());
|
|
||||||
inv.open();
|
|
||||||
} else if (extend == SchematicCommand.Extend.AUSFAHREN) {
|
} else if (extend == SchematicCommand.Extend.AUSFAHREN) {
|
||||||
new PrepareSchemPacket(SteamwarUser.get(player.getUniqueId()), node, type).send(player);
|
new PrepareSchemPacket(SteamwarUser.get(player.getUniqueId()), node, type).send(player);
|
||||||
player.sendMessage(SchematicSystem.PREFIX + "§aDer Vorbereitungsserver wird gestartet");
|
player.sendMessage(SchematicSystem.PREFIX + "§aDer Vorbereitungsserver wird gestartet");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void submitSchemGUI(Player player, SchematicNode node, SchematicType type) {
|
||||||
|
SWInventory inv = new SWInventory(player, 9, "Schematic ausfahren");
|
||||||
|
inv.setItem(0, SWItem.getMaterial("SIGN"), node.allowReplay() ? "§cReplay sperren" : "§aReplay erlauben", click -> {
|
||||||
|
node.setAllowReplay(!node.allowReplay());
|
||||||
|
submitSchemGUI(player, node, type);
|
||||||
|
});
|
||||||
|
inv.setItem(1, SWItem.getMaterial("PINK_WOOL"), node.replaceColor() ? "§cPink nicht zu Teamfarbe ersetzen" : "§aPink zu Teamfarbe ersetzen", click -> {
|
||||||
|
node.setReplaceColor(!node.replaceColor());
|
||||||
|
submitSchemGUI(player, node, type);
|
||||||
|
});
|
||||||
|
inv.setItem(7, SWItem.getDye(7), (byte) 7, "§eDirekt einsenden", click -> {
|
||||||
|
node.setSchemtype(type.checkType());
|
||||||
|
player.sendMessage(SchematicSystem.PREFIX + "§aDie Schematic wird zeitnah überprüft");
|
||||||
|
player.closeInventory();
|
||||||
|
});
|
||||||
|
inv.setItem(8, SWItem.getDye(10), (byte) 10, "§eSchematic ausfahren", click -> {
|
||||||
|
new PrepareSchemPacket(SteamwarUser.get(player.getUniqueId()), node, type).send(player);
|
||||||
|
player.sendMessage(SchematicSystem.PREFIX + "§aDer Vorbereitungsserver wird gestartet");
|
||||||
|
player.closeInventory();
|
||||||
|
});
|
||||||
|
inv.setCallback(-999, click -> player.closeInventory());
|
||||||
|
inv.open();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
1
pom.xml
1
pom.xml
@ -25,6 +25,7 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<source>1.8</source>
|
<source>1.8</source>
|
||||||
<target>1.8</target>
|
<target>1.8</target>
|
||||||
|
<compilerArgs>-Xlint</compilerArgs>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren