This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.github.Dinner1111.ServerUtils.ProjectBuilder; | |
import org.bukkit.Bukkit; | |
import org.bukkit.command.CommandSender; | |
import nu.xom.*; | |
public class ScriptStorage { | |
Document XML; | |
Element root = new Element("scripts"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Weee; | |
// The theme classes you need imported | |
import io.github.Dinner1111.ChatThemes.ThemeColors; | |
import io.github.Dinner1111.ChatThemes.ChatThemes.ThemeType; | |
import io.github.Dinner1111.ChatThemes.ChatThemes; | |
// Derp imports for the example | |
import org.bukkit.command.*; | |
import org.bukkit.entity.Player; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<map proto="1.3.0"> | |
<name>Opasis</name> | |
<version>1.0.0</version> | |
<objective>Kill the enemy team while staying alive yourself!</objective> | |
<authors> | |
<author>_DTC</author> | |
</authors> | |
<contributors> | |
<contributor contribution="XML">Dinner1111</contributor> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (cmd.getName().equalsIgnoreCase("util-config")) { | |
if (sender.hasPermission("Utils.Util.Config")) { | |
if (args.length == 2) { | |
if (sender instanceof Player) { | |
Player p = (Player) sender; | |
try { cm.getConfig().getConfigurationSection("players." + p.getName()).getKeys(false).contains(args[0]); } catch (Exception e) { | |
sender.sendMessage(theme.color1 + args[0] + theme.color3 + " is not a valid configuration section."); | |
sender.sendMessage(theme.color3 + "Usage: " + theme.color1 + "/util-config [player] [configuration section] [value]"); | |
return true; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@EventHandler | |
public void listen(EntityDamageEvent e) { | |
if (e.getEntityType().equals(EntityType.SNOWBALL)) { | |
Player p = (Player) e.getEntity(); | |
PotionEffect poteff = new PotionEffect(PotionEffectType.SLOW, 1, 100); | |
p.addPotionEffect(poteff); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (cmd.getName().equalsIgnoreCase("purge")) { | |
if (sender.hasPermission("Utils.Purge")) { | |
if (args.length == 0) { | |
for (Entity e : ((Player) sender).getWorld().getEntities()) { | |
if (!e.getType().equals(EntityType.VILLAGER) || !e.getType().equals(EntityType.PLAYER)) { | |
Bukkit.broadcastMessage(e.getType().toString()); | |
e.getWorld().spawnEntity(e.getLocation(), EntityType.LIGHTNING); | |
//e.remove(); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<map proto="1.3.0"> | |
<name>Nucleus</name> | |
<version>1.0.0</version> | |
<objective>Capture and hold the center hill!</objective> | |
<authors> | |
<author>Stealth5061</author> | |
<author>xXFracXx</author> | |
</authors> | |
<contributors> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.github.Dinner1111.ServerUtils; | |
import java.io.File; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.util.logging.Level; | |
import org.bukkit.configuration.file.FileConfiguration; | |
import org.bukkit.configuration.file.YamlConfiguration; | |
import org.bukkit.plugin.Plugin; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.github.Dinner1111.ServerUtils; | |
import io.github.Dinner1111.ServerUtils.ChatThemes.ThemeType; | |
import java.util.HashMap; | |
import java.util.Map; | |
import org.bukkit.Color; | |
public class ThemeColors { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (cmd.getName().equalsIgnoreCase("math")) { | |
if (sender.hasPermission("Utils.Math")) { | |
if (args.length != 0) { | |
List<String> operators = Lists.newArrayList("+", "++", "-", "--", "*", "/", "%", "=", "+=", "-=", "%=", "=+", "=-", "=%"); | |
double[] numbers = new double[args.length]; | |
String[] op = new String[args.length]; | |
int numLength = 0; | |
int opLength = 0; | |
for (int i = 0; i < args.length; i++) { | |
try { |