From 6de723705f0ca8597e5ddd1f428cf1d3df23ea16 Mon Sep 17 00:00:00 2001 From: Rigby Date: Fri, 18 Mar 2011 00:55:10 +0000 Subject: [PATCH] Alterations to the getAuthors function... Set Permissions to null onDisable. --- .../MultiVerseCore/MultiVerseCore.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/com/onarandombox/MultiVerseCore/MultiVerseCore.java b/src/com/onarandombox/MultiVerseCore/MultiVerseCore.java index 81790109..5e0658bd 100644 --- a/src/com/onarandombox/MultiVerseCore/MultiVerseCore.java +++ b/src/com/onarandombox/MultiVerseCore/MultiVerseCore.java @@ -1,6 +1,7 @@ package com.onarandombox.MultiVerseCore; import java.io.File; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -31,6 +32,7 @@ import com.onarandombox.MultiVerseCore.configuration.DefaultConfiguration; import com.onarandombox.utils.UpdateChecker; public class MultiVerseCore extends JavaPlugin { + // Setup our Map for our Commands using the CommandHandler. private Map commands = new HashMap(); @@ -112,7 +114,7 @@ public class MultiVerseCore extends JavaPlugin { // Start the Update Checker updateCheck = new UpdateChecker(this.getDescription().getName(),this.getDescription().getVersion()); } - + /** * Function to Register all the Events needed. */ @@ -268,7 +270,8 @@ public class MultiVerseCore extends JavaPlugin { * What happens when the plugin gets disabled... */ public void onDisable() { - log.info(logPrefix + "- Disabled"); + MultiVerseCore.Permissions = null; + log.info(logPrefix + "- Disabled"); } /** @@ -353,7 +356,13 @@ public class MultiVerseCore extends JavaPlugin { */ private String getAuthors(){ String authors = ""; - for(int i=0;i auths = this.getDescription().getAuthors(); + + if(auths.size()==1){ + return auths.get(0); + } + + for(int i=0;i