From 1fb36d25e5fdadc306b59971dd7fd11bc588db48 Mon Sep 17 00:00:00 2001 From: Charlie Wang Date: Fri, 12 Jul 2013 16:51:07 -0400 Subject: [PATCH] added config file, added config file reload command, and registered permissions in plugin.yml --- dist/DiscoSheep.jar | Bin 24466 -> 26851 bytes .../bukkit/discosheep/DiscoSheep.java | 19 +++++++-- .../discosheep/DiscoSheepCommandExecutor.java | 38 +++++++++++++----- src/plugin.yml | 32 ++++++++++++++- 4 files changed, 74 insertions(+), 15 deletions(-) diff --git a/dist/DiscoSheep.jar b/dist/DiscoSheep.jar index 917010ee310c3db018e14b4596210696e3b40643..158e26c07fe8ad9113a5bf63bce06d421be51ba6 100644 GIT binary patch literal 26851 zcmb_l31F1P^?$Rw*>AJ^u)Cfsh0U$J@;Tr#n%H>(!+OQ?1b|}!jKj=pqGS^g| zk>#z61_SY6PsQd#Tz+-s@;xihtk}0=wZEh_8t5Jf`s*Ump-40k2gGG4J`jk-D%t|^ z{Wbo9(7vjD!~OlCc*Tm!Gb>kCw6CaKQL%FQidD<2SFEmFQN5!2jI|XjD=!K}v%Ke2 z)U`G@H?(xt_?rWvaD@cqKNuPq@b3%y13f*#9)Dms9vMVS-GPCDL;ijEKO7q9$?|4- zlh_!KIHJDLz8GrtS4~_j7f4GKQ=Oiqba9%}J)u~4B(^^o97?J9kCvUIH)j&@@9N1b zZVm+a|3IX>zk?w)90-QvvC3{n>N9VC;StncMPVb2M%7*bT%*xiFV)aGAFZde ze6)c!aVKecyM1Z+8Nk4fRy~E z2qt+~AR6L#BheM#ABqWDHCY4cF^CRkMZ#?ZfkVM4dK`!XN=Z{B+Go&bRge)~H6#mE zS;{qp~XxG+}u`dFF)d91g{eCd<<_X`7TpS=r#S z@eNK;8l)Bu3`)Y1Gcgbd_f>VoqoHsg#_#Qj3`e_zTS82F#py{1TubsxPvRNG^<~ zP%It{2eEAO#}l$3X9=&3%5l|flOflgA{=A3Gy8&Zl^|$#iG4DybcPw45?d1Gm`Q+S z#D#(&{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J~67U9|KH^s(Wd4LI*pA zP~CyXSZZhiUX$%R7FuETldiS)ptU7XmDO2C&T#rne)hqd9-q2AE|mf;Xr$IM|Q9(Ji`(PPgdb#1(m%Qtx5=$Yq9 z^;GGc+`9+^%Q#dA7Ze>s4D(mK*O~3`C-JJvTU?MRkB0z1+~`1DXLek9bmNK~dj4Kf zODG6;F<8*Ggo4Nt47%8hBh#+rq&TtHlv_ZqJr37A7WKYK{nWYbGjp;o>~YZe_9O#1 zNg?;DD2kipu1S)+CQ0TbI)}=WloN?A;^#O@dG$qE;e?||d^APl;zT`)+^uriDCG=; zxU#aS8Fb4!cdU~QjT@t8NFi-EZlH>IAE5pv&_nN+5iy=}%_p`ZrJUFA)NCOnZ@Dj2l$3D52OYh zdK_E09~-;qF-Fj&u)$_V$L%Qo&ef^&dlW-EFw8!7adEgjqsQ3> zSkWoIa|~>aXKwh!0rKDsyzeYoP5A&FntCLtPl%CA54&b*m8tgK*;5uU)ZZ!7dCSxBHf9jVH(&oo;I<+}|iNG|B zhMGO(4KlQhu{1w|Ae)!)X`H;rqhvX;c)bDc?=)Rv5ob$G17bQLVyhenq?j5uuU5vr zjD?pn?C=@)FeYA0cN}Zn$#`}xZ93k#ouR0PmC44&l5~X=mt`AAFVYD=PBZPBmbnvlOGMAR?!Wz;7R|L!F3a|n&eO*K16f@~ A0{{R3 diff --git a/src/gibstick/bukkit/discosheep/DiscoSheep.java b/src/gibstick/bukkit/discosheep/DiscoSheep.java index af0ec70..3f79d5a 100644 --- a/src/gibstick/bukkit/discosheep/DiscoSheep.java +++ b/src/gibstick/bukkit/discosheep/DiscoSheep.java @@ -4,7 +4,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.bukkit.configuration.MemoryConfiguration; +import org.bukkit.configuration.Configuration; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin; @@ -13,13 +13,16 @@ public final class DiscoSheep extends JavaPlugin { Map parties = new HashMap(); private BaaBaaBlockSheepEvents blockEvents = new BaaBaaBlockSheepEvents(this); + FileConfiguration config; @Override public void onEnable() { getCommand("ds").setExecutor(new DiscoSheepCommandExecutor(this)); getServer().getPluginManager().registerEvents(blockEvents, this); - FileConfiguration config = this.getConfig(); + if (config == null) { + config = this.getConfig(); + } config.addDefault("max.sheep", DiscoParty.maxSheep); config.addDefault("max.radius", DiscoParty.maxRadius); @@ -30,8 +33,12 @@ public final class DiscoSheep extends JavaPlugin { config.addDefault("default.radius", DiscoParty.defaultRadius); config.addDefault("default.duration", toSeconds_i(DiscoParty.defaultDuration)); config.addDefault("default.period-ticks", DiscoParty.defaultPeriod); - config.options().copyDefaults(true); + loadConfigFromDisk(); + } + + void loadConfigFromDisk() { + getConfig().options().copyDefaults(true); saveConfig(); DiscoParty.maxSheep = getConfig().getInt("max.sheep"); @@ -44,10 +51,16 @@ public final class DiscoSheep extends JavaPlugin { DiscoParty.defaultDuration = toTicks(getConfig().getInt("default.duration")); DiscoParty.defaultPeriod = getConfig().getInt("default.period-ticks"); } + + void reloadConfigFromDisk() { + reloadConfig(); + loadConfigFromDisk(); + } @Override public void onDisable() { this.stopAllParties(); + this.config = null; } int toTicks(double seconds) { diff --git a/src/gibstick/bukkit/discosheep/DiscoSheepCommandExecutor.java b/src/gibstick/bukkit/discosheep/DiscoSheepCommandExecutor.java index 899a784..d63622c 100644 --- a/src/gibstick/bukkit/discosheep/DiscoSheepCommandExecutor.java +++ b/src/gibstick/bukkit/discosheep/DiscoSheepCommandExecutor.java @@ -19,10 +19,10 @@ public class DiscoSheepCommandExecutor implements CommandExecutor { private static final String PERMISSION_ALL = "discosheep.partyall"; private static final String PERMISSION_FIREWORKS = "discosheep.fireworks"; private static final String PERMISSION_STOP = "discosheep.stop"; - private static final String PERMISSION_SUPER = "disosheep.*"; + private static final String PERMISSION_RELOAD = "discosheep.reload"; private boolean senderHasPerm(CommandSender sender, String permission) { - return sender.hasPermission(permission) || sender.hasPermission(PERMISSION_SUPER); + return sender.hasPermission(permission); } private void noPermsMessage(CommandSender sender, String permission) { @@ -65,11 +65,6 @@ public class DiscoSheepCommandExecutor implements CommandExecutor { isPlayer = true; } - if (!senderHasPerm(sender, PERMISSION_PARTY)) { - noPermsMessage(sender, PERMISSION_PARTY); - return true; - } - for (int i = 1; i < args.length; i++) { if (args[i].equalsIgnoreCase("-fw")) { if (senderHasPerm(sender, PERMISSION_FIREWORKS)) { @@ -133,14 +128,37 @@ public class DiscoSheepCommandExecutor implements CommandExecutor { noPermsMessage(sender, PERMISSION_STOP); } return true; - } else if (args[0].equalsIgnoreCase("me")) { - if (isPlayer) { + } else if (args[0].equalsIgnoreCase("me") && isPlayer) { + if (senderHasPerm(sender, PERMISSION_PARTY)) { parent.startParty(player, duration, sheepNumber, radius, period, fireworks); return true; + } else { + noPermsMessage(sender, PERMISSION_PARTY); + } + } else if (args[0].equalsIgnoreCase("help")) { + sender.sendMessage(ChatColor.YELLOW + "DiscoSheep Help\n" + + ChatColor.GRAY + " Subcommands\n" + ChatColor.WHITE + + "me: start a party for yourself\n" + + "all: start a party for all players on the server\n" + + "stop: stop all parties (takes no arguments)\n" + + ChatColor.GRAY + " Arguments\n" + ChatColor.WHITE + + "-n : set the number of sheep per player that spawn\n" + + "-t : set the party duration in seconds\n" + + "-p : set the number of ticks between each disco beat\n" + + "-r : set radius of the area in which sheep can spawn\n" + + "-fw: enables fireworks"); + return true; + } else if (args[0].equalsIgnoreCase("reload")) { + if (senderHasPerm(sender, PERMISSION_RELOAD)) { + parent.reloadConfigFromDisk(); + sender.sendMessage(ChatColor.GREEN + "DiscoSheep config reloaded from disk"); + return true; + } else { + noPermsMessage(sender, PERMISSION_RELOAD); } } else { sender.sendMessage(ChatColor.RED + "Invalid argument."); - return true; + return false; } } diff --git a/src/plugin.yml b/src/plugin.yml index e7b7fd5..a79c424 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -1,7 +1,35 @@ name: DiscoSheep main: gibstick.bukkit.discosheep.DiscoSheep -version: 0.9 +authors: [Gibstick, RangerMauve] +version: 1.0 commands: ds: description: "Main DiscoSheep command" - usage: /ds [arguments] \ No newline at end of file + usage: | + [arguments] + Use /ds help for more information +permissions: + discosheep.*: + description: Permission node for all DiscoSheep commands + default: op + children: + discosheep.party: true + discosheep.partyall: true + discosheep.fireworks: true + discosheep.stop: true + discosheep.reload: true + discosheep.party: + description: Allows a player to have a party of one + default: op + discosheep.partyall: + description: Allows a player to call a server-wide party + default: op + discosheep.stop: + description: Allows a player to stop all parties on the server + default: op + discosheep.fireworks: + description: Allows a player to enable have parties with fireworks + default: op + discosheep.reload: + description: Allows a player to reload settings from config.yml + default: op \ No newline at end of file