From 6856c6d95a74ef9f08acc68d803212ee9598263f Mon Sep 17 00:00:00 2001 From: Jascha Starke Date: Tue, 15 Jan 2013 08:42:22 +0100 Subject: [PATCH 1/7] v1.4.6c: - added Beacon to List of chested items (like enderchest) --- plugin.yml | 2 +- pom.xml | 2 +- .../minecraft/limitedcreative/listeners/LimitListener.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin.yml b/plugin.yml index 60d6a68..a21b8bc 100644 --- a/plugin.yml +++ b/plugin.yml @@ -1,6 +1,6 @@ name: LimitedCreative main: de.jaschastarke.minecraft.limitedcreative.Core -version: 1.4.6b +version: 1.4.6c softdepend: [WorldGuard, WorldEdit, MultiInv] dev-url: http://dev.bukkit.org/server-mods/limited-creative/ commands: diff --git a/pom.xml b/pom.xml index 4aeefc4..0363856 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ de.jaschastarke LimitedCreative LimitedCreative - 1.4.6b + 1.4.6c https://github.com/possi/LimitedCreative scm:git:git://github.com/possi/LimitedCreative.git diff --git a/src/de/jaschastarke/minecraft/limitedcreative/listeners/LimitListener.java b/src/de/jaschastarke/minecraft/limitedcreative/listeners/LimitListener.java index aa5700a..8fe5c79 100644 --- a/src/de/jaschastarke/minecraft/limitedcreative/listeners/LimitListener.java +++ b/src/de/jaschastarke/minecraft/limitedcreative/listeners/LimitListener.java @@ -93,7 +93,7 @@ public class LimitListener implements Listener { Block block = event.getClickedBlock(); - if (block.getState() instanceof InventoryHolder || block.getType() == Material.ENDER_CHEST) { // Workaround, Bukkit not recognize a Enderchest + if (block.getState() instanceof InventoryHolder || block.getType() == Material.ENDER_CHEST || block.getType() == Material.BEACON) { // Workaround, Bukkit not recognize a Enderchest player.onChestAccess(event); } else if (block.getState() instanceof Sign) { player.onSignAccess(event); From c85a541b92244a654f3db781f4960fa0eb3009a7 Mon Sep 17 00:00:00 2001 From: Jascha Starke Date: Wed, 16 Jan 2013 15:00:38 +0100 Subject: [PATCH 2/7] Multiverse-Inventories compatibility disable --- src/de/jaschastarke/minecraft/limitedcreative/Core.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/de/jaschastarke/minecraft/limitedcreative/Core.java b/src/de/jaschastarke/minecraft/limitedcreative/Core.java index f8839da..0a04847 100644 --- a/src/de/jaschastarke/minecraft/limitedcreative/Core.java +++ b/src/de/jaschastarke/minecraft/limitedcreative/Core.java @@ -75,6 +75,9 @@ public class Core extends JavaPlugin { if (config.getStoreEnabled() && getServer().getPluginManager().isPluginEnabled("MultiInv")) { warn(L("basic.conflict", "MultiInv", L("basic.feature.store"))); config.setTempStoreEnabled(false); + } else if (config.getStoreEnabled() && getServer().getPluginManager().isPluginEnabled("Multiverse-Inventories")) { + warn(L("basic.conflict", "Multiverse-Inventories", L("basic.feature.store"))); + config.setTempStoreEnabled(false); } if (config.getStoreEnabled()) { com.hookAuthInvs(); From 8afab9c603f656ea8afbcb05c02e5a78ef6000b4 Mon Sep 17 00:00:00 2001 From: Jascha Starke Date: Fri, 18 Jan 2013 09:00:04 +0100 Subject: [PATCH 3/7] - added Enchantment-Tables to blockbenches --- pom.xml | 12 +++++++++--- .../limitedcreative/listeners/LimitListener.java | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 0363856..5572103 100644 --- a/pom.xml +++ b/pom.xml @@ -84,32 +84,38 @@ 1.4.6-R0.1 + org.bukkit craftbukkit 1.4.6-R0.1 + com.sk89q worldedit - 5.4.5 + 5.5 compile + com.sk89q worldguard - 5.6.6-SNAPSHOT + 5.7 + uk.org.whoami authme - 2.7.1 + 2.7.2 + com.onarandombox.multiversecore Multiverse-Core 2.4 + com.cypherx xauth 2.0.26 diff --git a/src/de/jaschastarke/minecraft/limitedcreative/listeners/LimitListener.java b/src/de/jaschastarke/minecraft/limitedcreative/listeners/LimitListener.java index 8fe5c79..f744093 100644 --- a/src/de/jaschastarke/minecraft/limitedcreative/listeners/LimitListener.java +++ b/src/de/jaschastarke/minecraft/limitedcreative/listeners/LimitListener.java @@ -99,7 +99,7 @@ public class LimitListener implements Listener { player.onSignAccess(event); } else if (block.getState() instanceof Lever || block.getState() instanceof Button) { player.onButtonAccess(event); - } else if (block.getType() == Material.WORKBENCH || block.getType() == Material.ANVIL) { + } else if (block.getType() == Material.WORKBENCH || block.getType() == Material.ANVIL || block.getType() == Material.ENCHANTMENT_TABLE) { player.onBenchAccess(event); } } From 8cfb65365aaec3fd55779bffa20d7506bfaa2792 Mon Sep 17 00:00:00 2001 From: Jascha Starke Date: Fri, 18 Jan 2013 09:02:01 +0100 Subject: [PATCH 4/7] Updated Version number --- plugin.yml | 4 ++-- pom.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin.yml b/plugin.yml index a21b8bc..9967591 100644 --- a/plugin.yml +++ b/plugin.yml @@ -1,7 +1,7 @@ name: LimitedCreative main: de.jaschastarke.minecraft.limitedcreative.Core -version: 1.4.6c -softdepend: [WorldGuard, WorldEdit, MultiInv] +version: 1.4.7a +softdepend: [WorldGuard, WorldEdit, MultiInv, xAuth, AuthMe, MultiInv, Multiverse-Inventories] dev-url: http://dev.bukkit.org/server-mods/limited-creative/ commands: limitedcreative: diff --git a/pom.xml b/pom.xml index 5572103..76dcc0f 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ de.jaschastarke LimitedCreative LimitedCreative - 1.4.6c + 1.4.7a https://github.com/possi/LimitedCreative scm:git:git://github.com/possi/LimitedCreative.git From 5078df241e2e733bd6ee26b9dec1fe71b2bb1a14 Mon Sep 17 00:00:00 2001 From: Jascha Starke Date: Tue, 29 Jan 2013 22:31:01 +0100 Subject: [PATCH 5/7] v1.4.7b: - Metrics to monitor plugin usage - Region Safemode: http://dev.bukkit.org/server-mods/limited-creative/tickets/81-getting-out-of-creative-region-with-creative/ --- config.yml | 18 +- plugin.yml | 2 +- pom.xml | 7 +- settings.properties | 2 + .../bukkit/tools/stats/IStatistics.java | 10 + .../bukkit/tools/stats/PiwikStatistics.java | 245 ++++++++++++++++++ .../bukkit/tools/stats/StatsUtils.java | 58 +++++ .../limitedcreative/Configuration.java | 5 + .../minecraft/limitedcreative/Core.java | 5 + .../minecraft/limitedcreative/LCPlayer.java | 4 + 10 files changed, 350 insertions(+), 6 deletions(-) create mode 100644 settings.properties create mode 100644 src/de/jaschastarke/bukkit/tools/stats/IStatistics.java create mode 100644 src/de/jaschastarke/bukkit/tools/stats/PiwikStatistics.java create mode 100644 src/de/jaschastarke/bukkit/tools/stats/StatsUtils.java diff --git a/config.yml b/config.yml index 6dddd84..33b9e17 100644 --- a/config.yml +++ b/config.yml @@ -140,7 +140,14 @@ region: # Hint: Is very confusing, if MultiVerse "enforce gamemode" swaps your state. # default: false remember: false - + + # RegionSafeMode + # When a player leaves a region he always will get back to the world gamemode, even if he entered the region already + # in the region-gamemode. So its the opposite analog to RegionRememberOptional. + # That means: If a GM in creative-mode walks/flies through a creative-region in a survival world, he will get back + # to survival on leaving the region. + # default: false + safemode: false cmdblock: # CommandBlockerEnabled @@ -167,4 +174,11 @@ cmdblock: # Uncomment the "locale: en_US"-Line, to override the locale which be used for localized messages. By default the # System-Locale is used (selected by Java depending on LC_LANG-Environment-Variable # default: none (Use System-Default Locale) -#locale: en_US \ No newline at end of file +#locale: en_US + +# Metrics +# This settings allows the Addon-Author to track the Servers using this plugin. It will not track any player +# related data like names, ips, online time or such. Please do not disable the option! As more servers are using +# the plugin and the author knows, as more he is willing to support the plugin! Its a win-win for both. +# default: true +metrics: true diff --git a/plugin.yml b/plugin.yml index 9967591..d1e5e37 100644 --- a/plugin.yml +++ b/plugin.yml @@ -1,6 +1,6 @@ name: LimitedCreative main: de.jaschastarke.minecraft.limitedcreative.Core -version: 1.4.7a +version: 1.4.7b softdepend: [WorldGuard, WorldEdit, MultiInv, xAuth, AuthMe, MultiInv, Multiverse-Inventories] dev-url: http://dev.bukkit.org/server-mods/limited-creative/ commands: diff --git a/pom.xml b/pom.xml index 76dcc0f..ad95df6 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ de.jaschastarke LimitedCreative LimitedCreative - 1.4.7a + 1.4.7b https://github.com/possi/LimitedCreative scm:git:git://github.com/possi/LimitedCreative.git @@ -57,6 +57,7 @@ plugin.yml config.yml + settings.properties @@ -81,13 +82,13 @@ org.bukkit bukkit - 1.4.6-R0.1 + 1.4.7-R0.1 org.bukkit craftbukkit - 1.4.6-R0.1 + 1.4.7-R0.1 diff --git a/settings.properties b/settings.properties new file mode 100644 index 0000000..ed3b3f7 --- /dev/null +++ b/settings.properties @@ -0,0 +1,2 @@ +piwik_url = http://stats.ja-s.de/piwikProxy.php +piwik_site_id = 2 \ No newline at end of file diff --git a/src/de/jaschastarke/bukkit/tools/stats/IStatistics.java b/src/de/jaschastarke/bukkit/tools/stats/IStatistics.java new file mode 100644 index 0000000..0909a60 --- /dev/null +++ b/src/de/jaschastarke/bukkit/tools/stats/IStatistics.java @@ -0,0 +1,10 @@ +package de.jaschastarke.bukkit.tools.stats; + +public interface IStatistics { + public static final String SEPERATOR = "/"; + /** + * Use the {@see SEPERATOR} to create subgroup of events + * @param event + */ + public void trackEvent(String event); +} diff --git a/src/de/jaschastarke/bukkit/tools/stats/PiwikStatistics.java b/src/de/jaschastarke/bukkit/tools/stats/PiwikStatistics.java new file mode 100644 index 0000000..e967611 --- /dev/null +++ b/src/de/jaschastarke/bukkit/tools/stats/PiwikStatistics.java @@ -0,0 +1,245 @@ +package de.jaschastarke.bukkit.tools.stats; + +import java.io.IOException; +import java.io.InputStream; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLConnection; +import java.util.ArrayList; +import java.util.List; +import java.util.Properties; +import java.util.Stack; +import java.util.UUID; + +import org.bukkit.ChatColor; +import org.bukkit.plugin.Plugin; +import org.bukkit.plugin.java.JavaPlugin; +import org.json.simple.JSONArray; +import org.json.simple.JSONObject; + +/** + * Use the piwik-Proxy https://gist.github.com/4664325 to track the online-count as seperate requests to get a propper + * graph of usage. + * + * Settings as Properties: + * - piwik_url : required; URL to the piwik.php or the proxy file (see above) + * - piwik_site_id : required; The Site-ID of the Piwik-Website to use for tracking + * - stats_interval : optional; seconds between tracking online count (defaults to 300 for 5 min) + */ +public class PiwikStatistics implements IStatistics { + private static final int TICKS_PER_SECOND = 20; + private static final long DEFAULT_WAIT = 6000L; // 6000 ticks or 300 seconds or 5 minutes + private static final int MAX_CVAR_SIZE = 200; + private static final int APIV = 1; + private URL apiUrl; + private int idSite; + private Plugin plugin; + private String pluginname; + private String version; + private String server; + private String serverid = getUniqueID(); + private String servername; + private String servermotd; + private long wait = DEFAULT_WAIT; + + private static final String PIWIK_FIELD_CVAR = "cvar"; + + /** + * Single call instantiate + * + * Also calls .register, + */ + public PiwikStatistics(final JavaPlugin plugin) { + Properties settings = new Properties(); + try { + settings.load(plugin.getClass().getClassLoader().getResourceAsStream("settings.properties")); + init(settings); + register(plugin); + } catch (IOException e) { + e.printStackTrace(); + } + } + /** + * Single call instantiate + * + * Also calls .register, + */ + public PiwikStatistics(final JavaPlugin plugin, final InputStream settingsFile) { + Properties settings = new Properties(); + try { + settings.load(settingsFile); + init(settings); + register(plugin); + } catch (IOException e) { + e.printStackTrace(); + } + } + public PiwikStatistics(final Properties settings) { + init(settings); + } + private void init(final Properties settings) { + try { + String url = settings.getProperty("piwik_url"); + if (url.isEmpty()) { + apiUrl = null; + return; + } + apiUrl = new URL(url); + idSite = Integer.parseInt(settings.getProperty("piwik_site_id")); + String seconds = settings.getProperty("stats_interval"); + if (seconds != null && !seconds.isEmpty()) + wait = Long.parseLong(seconds) * TICKS_PER_SECOND; + } catch (MalformedURLException e) { + throw new IllegalArgumentException("Invalid Piwik-URL defined", e); + } + } + + public static String getUniqueID() { + return String.format("%016x", UUID.randomUUID().getMostSignificantBits()); + } + + public void register(final Plugin rplugin) { + if (apiUrl == null) + return; + plugin = rplugin; + //plugin.getServer().getPluginManager().registerEvents(new StatsListener(), plugin); + pluginname = plugin.getName(); + version = plugin.getDescription().getVersion(); + + plugin.getServer().getScheduler().runTaskLaterAsynchronously(plugin, new Runnable() { + @Override + public void run() { + // Well, we all know it isn't http, but as piwik is a website tracking, it doesn't tracks the url if it isn't a http url ;) + server = "http://" + StatsUtils.getIP(plugin.getServer()) + ":" + plugin.getServer().getPort(); + servername = ChatColor.stripColor(plugin.getServer().getServerName().replace(SEPERATOR, "-")); + servermotd = ChatColor.stripColor(plugin.getServer().getMotd().replace(SEPERATOR, "-").replaceAll("\\s+", " ")); + trackEnable(); + } + }, wait); + plugin.getServer().getScheduler().scheduleSyncRepeatingTask(plugin, new Runnable() { + @Override + public void run() { + final int playercount = plugin.getServer().getOnlinePlayers().length; + if (playercount > 0) { + plugin.getServer().getScheduler().runTaskAsynchronously(plugin, new Runnable() { + @Override + public void run() { + trackOnlineUsage(playercount); + } + }); + } + } + }, wait, wait); + } + + private void trackEnable() { + Plugin[] pluginlist = plugin.getServer().getPluginManager().getPlugins(); + List cdata = new ArrayList(); + cdata.add(new String[]{"Server-Name", servername}); + cdata.add(new String[]{"Server-Version", (plugin.getServer().getName() + " " + plugin.getServer().getVersion())}); + cdata.add(new String[]{"Plugin-Version", pluginname + " " + version}); + + Stack plugins = new Stack(); + plugins.add(new StringBuilder("")); + + for (Plugin cplugin : pluginlist) { + StringBuilder currentPlugins = plugins.lastElement(); + if ((currentPlugins.length() + cplugin.getName().length() + 1) > MAX_CVAR_SIZE) { + plugins.add(new StringBuilder()); + currentPlugins = plugins.lastElement(); + } + if (currentPlugins.length() > 0) + currentPlugins.append(","); + currentPlugins.append(cplugin.getName()); + } + for (int i = 0; i < plugins.size(); i++) { + String plname = i == 0 ? "Plugins" : ("Plugins " + (i + 1)); + cdata.add(new String[]{plname, plugins.get(i).toString()}); + } + cdata.add(new String[]{"Mode", plugin.getServer().getOnlineMode() ? "Online" : "Offline"}); + JSONObject cvar = getCVar(cdata.toArray(new String[cdata.size()][])); + + String[][] args = new String[][]{ + {"action_name", servermotd}, + {PIWIK_FIELD_CVAR, cvar.toJSONString()} + }; + track(server + SEPERATOR + pluginname + "/load", args); + } + + private void trackOnlineUsage(final int playercount) { + List cdata = new ArrayList(); + cdata.add(new String[]{"Online-Count", Integer.toString(playercount)}); + if (!plugin.getServer().getOnlineMode()) + cdata.add(new String[]{"Offline-Mode", "yes"}); + JSONObject cvar = getCVar(cdata.toArray(new String[cdata.size()][])); + + track(server + SEPERATOR + pluginname + "/usage", new String[][]{ + {"multiple", Integer.toString(playercount)}, // handled by piwikProxy.php to create a Batch-Request to simulate multiple hits + {PIWIK_FIELD_CVAR, cvar.toJSONString()} + }); + } + + @SuppressWarnings("unchecked") + public static JSONObject getCVar(final String[][] cvars) { + JSONObject cvar = new JSONObject(); + for (int i = 0; i < cvars.length; i++) { + JSONArray t = new JSONArray(); + t.add(cvars[i][0]); + t.add(cvars[i][1]); + cvar.put(Integer.toString(i + 1), t); + } + return cvar; + } + + protected void track(final String target, final String[][] addargs) { + String[][] basicargs = new String[][]{ + {"idsite", Integer.toString(idSite)}, + {"rec", "1"}, + {"url", target}, + {"_id", serverid}, + {"rand", Long.toString(System.currentTimeMillis())}, + {"apiv", Integer.toString(APIV)}, + }; + + String[][] arguments; + if (addargs.length > 0) { + arguments = new String[basicargs.length + addargs.length][2]; + System.arraycopy(basicargs, 0, arguments, 0, basicargs.length); + System.arraycopy(addargs, 0, arguments, basicargs.length, addargs.length); + } else { + arguments = basicargs; + } + + try { + URL req = StatsUtils.buildRequest(apiUrl, arguments); + URLConnection conn = req.openConnection(); + //System.out.println(req.toString()); + conn.setUseCaches(false); + conn.connect(); + InputStream in = conn.getInputStream(); + in.read(); + in.close(); + } catch (IllegalArgumentException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + } + + /*class StatsListener implements Listener { + @EventHandler + public void onJoin(final PlayerJoinEvent event) { + plugin.getServer().getScheduler().scheduleAsyncDelayedTask(plugin, new Runnable() { + @Override + public void run() { + track(server + SEPERATOR + pluginname + "/join", new String[0][0]); + } + }); + } + }*/ + + @Override + public void trackEvent(final String event) { + track(server + SEPERATOR + pluginname + SEPERATOR + event, new String[0][0]); + } +} diff --git a/src/de/jaschastarke/bukkit/tools/stats/StatsUtils.java b/src/de/jaschastarke/bukkit/tools/stats/StatsUtils.java new file mode 100644 index 0000000..60346b9 --- /dev/null +++ b/src/de/jaschastarke/bukkit/tools/stats/StatsUtils.java @@ -0,0 +1,58 @@ +package de.jaschastarke.bukkit.tools.stats; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.UnsupportedEncodingException; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLEncoder; + +import org.bukkit.Server; + +public final class StatsUtils { + private static final String ENCODING = "UTF-8"; + private StatsUtils() { + } + + public static String getIP(final Server server) { + String ip = server.getIp(); + if (ip.isEmpty()) { + try { + URL getip = new URL("http://checkip.amazonaws.com/"); + BufferedReader in = new BufferedReader(new InputStreamReader(getip.openStream())); + ip = in.readLine(); + in.close(); + } catch (MalformedURLException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + } + return ip; + } + + public static String enc(final String s) { + try { + return URLEncoder.encode(s, ENCODING); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + return s; + } + + public static URL buildRequest(final URL url, final String[][] arguments) { + StringBuilder u = new StringBuilder(url.toString()); + for (int i = 0; i < arguments.length; i++) { + u.append(i == 0 ? "?" : "&"); + u.append(arguments[i][0]); + u.append("="); + u.append(enc(arguments[i][1])); + } + try { + return new URL(u.toString()); + } catch (MalformedURLException e) { + throw new IllegalArgumentException("Arguments couldn't build to a new URL"); + } + } +} diff --git a/src/de/jaschastarke/minecraft/limitedcreative/Configuration.java b/src/de/jaschastarke/minecraft/limitedcreative/Configuration.java index 2c2ede7..30b57a9 100644 --- a/src/de/jaschastarke/minecraft/limitedcreative/Configuration.java +++ b/src/de/jaschastarke/minecraft/limitedcreative/Configuration.java @@ -49,6 +49,7 @@ public class Configuration { ADVENTUREINV("store.adventure", false), REGION_OPTIONAL("region.optional", true), REGION_REMEMBER("region.remember", false), + REGION_SAFEMODE("region.safemode", false), BLOCKPICKUP("limit.pickup", true), BLOCKSIGN("limit.sign", true), BLOCKBUTTON("limit.button", false), @@ -58,6 +59,7 @@ public class Configuration { REMOVEPICKUP("limit.remove_pickup", false), PERM_WEPIF("permissions.wepif", true), CMDBLOCKER("cmdblocker.enabled", true), + METRICS("metrics", true), DEBUG("debug", false); private String key; @@ -162,6 +164,9 @@ public class Configuration { public boolean getRegionRememberOptional() { return this.getRegionOptional() && this.getBoolean(Option.REGION_REMEMBER); } + public boolean getRegionSafeMode() { + return this.getBoolean(Option.REGION_SAFEMODE); + } public String getLocale() { if (c.contains("locale") && c.getString("locale") != "none") diff --git a/src/de/jaschastarke/minecraft/limitedcreative/Core.java b/src/de/jaschastarke/minecraft/limitedcreative/Core.java index 0a04847..fbf4a46 100644 --- a/src/de/jaschastarke/minecraft/limitedcreative/Core.java +++ b/src/de/jaschastarke/minecraft/limitedcreative/Core.java @@ -24,7 +24,9 @@ import org.bukkit.event.HandlerList; import org.bukkit.plugin.PluginDescriptionFile; import org.bukkit.plugin.java.JavaPlugin; +import de.jaschastarke.bukkit.tools.stats.PiwikStatistics; import de.jaschastarke.minecraft.integration.Communicator; +import de.jaschastarke.minecraft.limitedcreative.Configuration.Option; import de.jaschastarke.minecraft.limitedcreative.cmdblock.CommandBlocker; import de.jaschastarke.minecraft.limitedcreative.listeners.LimitListener; import de.jaschastarke.minecraft.limitedcreative.listeners.MainListener; @@ -106,6 +108,9 @@ public class Core extends JavaPlugin { Commands.register(this); + if (config.getBoolean(Option.METRICS)) + new PiwikStatistics(this); + /*plugin.getServer().getScheduler().scheduleSyncRepeatingTask(plugin, new Runnable() { @Override public void run() { diff --git a/src/de/jaschastarke/minecraft/limitedcreative/LCPlayer.java b/src/de/jaschastarke/minecraft/limitedcreative/LCPlayer.java index 26599fa..72c8b6d 100644 --- a/src/de/jaschastarke/minecraft/limitedcreative/LCPlayer.java +++ b/src/de/jaschastarke/minecraft/limitedcreative/LCPlayer.java @@ -161,9 +161,13 @@ public class LCPlayer { _permanent_gamemode = temp; } public boolean isInPermanentGameMode() { + if (plugin.config.getRegionSafeMode()) + return false; return isInPermanentGameMode(getPlayer().getGameMode()); } public boolean isInPermanentGameMode(GameMode temp) { + if (plugin.config.getRegionSafeMode()) + return false; Core.debug(getName()+": get permanent game mode: " + _permanent_gamemode); return temp.equals(_permanent_gamemode); } From fd2314953b9fdd1968b47ae7b75d20242a3d8b69 Mon Sep 17 00:00:00 2001 From: Jascha Starke Date: Tue, 29 Jan 2013 23:20:25 +0100 Subject: [PATCH 6/7] Metrics config command hint --- config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/config.yml b/config.yml index 33b9e17..703aee4 100644 --- a/config.yml +++ b/config.yml @@ -180,5 +180,6 @@ cmdblock: # This settings allows the Addon-Author to track the Servers using this plugin. It will not track any player # related data like names, ips, online time or such. Please do not disable the option! As more servers are using # the plugin and the author knows, as more he is willing to support the plugin! Its a win-win for both. +# Changing the option via command requires a reload to take effect. # default: true metrics: true From 60216d4067fd88d04c75d9cd02691035aa975a37 Mon Sep 17 00:00:00 2001 From: Jascha Starke Date: Sun, 10 Feb 2013 10:07:53 +0100 Subject: [PATCH 7/7] Relocated MVN-Repo & CI --- plugin.yml | 2 +- pom.xml | 37 +++++++++++++++++++++++++++++++------ 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/plugin.yml b/plugin.yml index d1e5e37..f658b41 100644 --- a/plugin.yml +++ b/plugin.yml @@ -1,6 +1,6 @@ name: LimitedCreative main: de.jaschastarke.minecraft.limitedcreative.Core -version: 1.4.7b +version: 1.4.7c softdepend: [WorldGuard, WorldEdit, MultiInv, xAuth, AuthMe, MultiInv, Multiverse-Inventories] dev-url: http://dev.bukkit.org/server-mods/limited-creative/ commands: diff --git a/pom.xml b/pom.xml index ad95df6..bfb72db 100644 --- a/pom.xml +++ b/pom.xml @@ -3,20 +3,37 @@ de.jaschastarke LimitedCreative LimitedCreative - 1.4.7b + 1.4.7c-SNAPSHOT https://github.com/possi/LimitedCreative + scm:git:git://github.com/possi/LimitedCreative.git scm:git:git@github.com:possi/LimitedCreative.git https://github.com/possi/LimitedCreative/tree/master + + + + de-jas-repo + scp://repo@ja-s.de/var/customers/webs/repo/mvn + + + + jenkins + http://ci.ja-s.de:8080/ + + + BukkitDev + http://dev.bukkit.org/server-mods/limited-creative/tickets/ + + + Supports http only --> - de-jas-mvn - https://repository-possi.forge.cloudbees.com/release + de-jas-repo + http://repo.ja-s.de/mvn @@ -77,18 +94,26 @@ + + + + org.apache.maven.wagon + wagon-ssh + 1.0 + + org.bukkit bukkit - 1.4.7-R0.1 + 1.4.7-R1.0 org.bukkit craftbukkit - 1.4.7-R0.1 + 1.4.7-R1.0