From 1bc996652fa60f74b4d05468210cb9a9f36830f2 Mon Sep 17 00:00:00 2001 From: Johannes Date: Sat, 5 Dec 2015 15:22:24 +0100 Subject: [PATCH] bugfixes --- doc/allclasses-frame.html | 19 + doc/allclasses-noframe.html | 19 + doc/constant-values.html | 122 +++++ doc/de/joethei/core/Core.html | 438 +++++++++++++++ doc/de/joethei/core/class-use/Core.html | 162 ++++++ doc/de/joethei/core/package-frame.html | 20 + doc/de/joethei/core/package-summary.html | 142 +++++ doc/de/joethei/core/package-tree.html | 139 +++++ doc/de/joethei/core/package-use.html | 142 +++++ doc/deprecated-list.html | 122 +++++ doc/help-doc.html | 223 ++++++++ doc/index-files/index-1.html | 131 +++++ doc/index-files/index-2.html | 127 +++++ doc/index-files/index-3.html | 127 +++++ doc/index-files/index-4.html | 129 +++++ doc/index-files/index-5.html | 127 +++++ doc/index-files/index-6.html | 129 +++++ doc/index-files/index-7.html | 129 +++++ doc/index-files/index-8.html | 127 +++++ doc/index.html | 71 +++ doc/overview-tree.html | 143 +++++ doc/package-list | 1 + doc/script.js | 30 + doc/stylesheet.css | 574 ++++++++++++++++++++ src/de/joethei/core/Core.java | 10 +- src/de/joethei/core/api/Config.java | 1 + src/de/joethei/core/api/Messages.java | 58 +- src/de/joethei/core/api/MojangService.java | 216 ++++---- src/de/joethei/core/api/Perms.java | 14 +- src/de/joethei/core/commands/SetRank.java | 2 +- src/de/joethei/core/listeners/Chat.java | 10 +- src/de/joethei/core/listeners/Commands.java | 3 +- 32 files changed, 3569 insertions(+), 138 deletions(-) create mode 100644 doc/allclasses-frame.html create mode 100644 doc/allclasses-noframe.html create mode 100644 doc/constant-values.html create mode 100644 doc/de/joethei/core/Core.html create mode 100644 doc/de/joethei/core/class-use/Core.html create mode 100644 doc/de/joethei/core/package-frame.html create mode 100644 doc/de/joethei/core/package-summary.html create mode 100644 doc/de/joethei/core/package-tree.html create mode 100644 doc/de/joethei/core/package-use.html create mode 100644 doc/deprecated-list.html create mode 100644 doc/help-doc.html create mode 100644 doc/index-files/index-1.html create mode 100644 doc/index-files/index-2.html create mode 100644 doc/index-files/index-3.html create mode 100644 doc/index-files/index-4.html create mode 100644 doc/index-files/index-5.html create mode 100644 doc/index-files/index-6.html create mode 100644 doc/index-files/index-7.html create mode 100644 doc/index-files/index-8.html create mode 100644 doc/index.html create mode 100644 doc/overview-tree.html create mode 100644 doc/package-list create mode 100644 doc/script.js create mode 100644 doc/stylesheet.css diff --git a/doc/allclasses-frame.html b/doc/allclasses-frame.html new file mode 100644 index 0000000..cc60194 --- /dev/null +++ b/doc/allclasses-frame.html @@ -0,0 +1,19 @@ + + + + + +All Classes + + + + + +

All Classes

+
+ +
+ + diff --git a/doc/allclasses-noframe.html b/doc/allclasses-noframe.html new file mode 100644 index 0000000..ab90185 --- /dev/null +++ b/doc/allclasses-noframe.html @@ -0,0 +1,19 @@ + + + + + +All Classes + + + + + +

All Classes

+
+ +
+ + diff --git a/doc/constant-values.html b/doc/constant-values.html new file mode 100644 index 0000000..aee6307 --- /dev/null +++ b/doc/constant-values.html @@ -0,0 +1,122 @@ + + + + + +Constant Field Values + + + + + + + + +
+ + + + + + + +
+ + +
+

Constant Field Values

+

Contents

+
+ +
+ + + + + + + +
+ + + + diff --git a/doc/de/joethei/core/Core.html b/doc/de/joethei/core/Core.html new file mode 100644 index 0000000..608d2b3 --- /dev/null +++ b/doc/de/joethei/core/Core.html @@ -0,0 +1,438 @@ + + + + + +Core + + + + + + + + +
+ + + + + + + +
+ + + +
+
de.joethei.core
+

Class Core

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    org.bukkit.command.CommandExecutor, org.bukkit.command.TabCompleter, org.bukkit.command.TabExecutor, org.bukkit.plugin.Plugin
    +
    +
    +
    +
    public class Core
    +extends org.bukkit.plugin.java.JavaPlugin
    +
    main class
    +
    +
    Version:
    +
    1.0
    +
    Author:
    +
    joethei
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      static Coreinstance +
      plugin instance
      +
      static java.util.HashMap<de.joethei.core.api.CustomPlayer,java.lang.String>nicks +
      nick names of players
      +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      Core() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      static CoregetInstance() 
      static voidlog(java.util.logging.Level level, + java.lang.String string) 
      voidonDisable() 
      voidonEnable() 
      static de.joethei.core.api.MySQLreturnSQL() 
      +
        +
      • + + +

        Methods inherited from class org.bukkit.plugin.java.JavaPlugin

        +getCommand, getConfig, getDatabase, getDatabaseClasses, getDataFolder, getDefaultWorldGenerator, getDescription, getLogger, getPlugin, getPluginLoader, getProvidingPlugin, getResource, getServer, isEnabled, isInitialized, isNaggable, onCommand, onLoad, onTabComplete, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setNaggable, toString
      • +
      +
        +
      • + + +

        Methods inherited from class org.bukkit.plugin.PluginBase

        +equals, getName, hashCode
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        instance

        +
        public static Core instance
        +
        plugin instance
        +
      • +
      + + + +
        +
      • +

        nicks

        +
        public static java.util.HashMap<de.joethei.core.api.CustomPlayer,java.lang.String> nicks
        +
        nick names of players
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Core

        +
        public Core()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getInstance

        +
        public static Core getInstance()
        +
        +
        Returns:
        +
        plugin instance
        +
        +
      • +
      + + + +
        +
      • +

        returnSQL

        +
        public static de.joethei.core.api.MySQL returnSQL()
        +
        +
        Returns:
        +
        sql
        +
        +
      • +
      + + + +
        +
      • +

        log

        +
        public static void log(java.util.logging.Level level,
        +                       java.lang.String string)
        +
        +
        Parameters:
        +
        level - Log level
        +
        string - String
        +
        +
      • +
      + + + +
        +
      • +

        onEnable

        +
        public void onEnable()
        +
        +
        Specified by:
        +
        onEnable in interface org.bukkit.plugin.Plugin
        +
        Overrides:
        +
        onEnable in class org.bukkit.plugin.java.JavaPlugin
        +
        +
      • +
      + + + +
        +
      • +

        onDisable

        +
        public void onDisable()
        +
        +
        Specified by:
        +
        onDisable in interface org.bukkit.plugin.Plugin
        +
        Overrides:
        +
        onDisable in class org.bukkit.plugin.java.JavaPlugin
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/doc/de/joethei/core/class-use/Core.html b/doc/de/joethei/core/class-use/Core.html new file mode 100644 index 0000000..cfe2df5 --- /dev/null +++ b/doc/de/joethei/core/class-use/Core.html @@ -0,0 +1,162 @@ + + + + + +Uses of Class de.joethei.core.Core + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
de.joethei.core.Core

+
+
+ +
+ +
+ + + + + + + +
+ + + + diff --git a/doc/de/joethei/core/package-frame.html b/doc/de/joethei/core/package-frame.html new file mode 100644 index 0000000..d690dc6 --- /dev/null +++ b/doc/de/joethei/core/package-frame.html @@ -0,0 +1,20 @@ + + + + + +de.joethei.core + + + + + +

de.joethei.core

+
+

Classes

+ +
+ + diff --git a/doc/de/joethei/core/package-summary.html b/doc/de/joethei/core/package-summary.html new file mode 100644 index 0000000..b434111 --- /dev/null +++ b/doc/de/joethei/core/package-summary.html @@ -0,0 +1,142 @@ + + + + + +de.joethei.core + + + + + + + + +
+ + + + + + + +
+ + +
+

Package de.joethei.core

+
+
+ +
+ +
+ + + + + + + +
+ + + + diff --git a/doc/de/joethei/core/package-tree.html b/doc/de/joethei/core/package-tree.html new file mode 100644 index 0000000..46b1f87 --- /dev/null +++ b/doc/de/joethei/core/package-tree.html @@ -0,0 +1,139 @@ + + + + + +de.joethei.core Class Hierarchy + + + + + + + + +
+ + + + + + + +
+ + +
+

Hierarchy For Package de.joethei.core

+
+
+

Class Hierarchy

+ +
+ +
+ + + + + + + +
+ + + + diff --git a/doc/de/joethei/core/package-use.html b/doc/de/joethei/core/package-use.html new file mode 100644 index 0000000..ffdd895 --- /dev/null +++ b/doc/de/joethei/core/package-use.html @@ -0,0 +1,142 @@ + + + + + +Uses of Package de.joethei.core + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Package
de.joethei.core

+
+
+ +
+ +
+ + + + + + + +
+ + + + diff --git a/doc/deprecated-list.html b/doc/deprecated-list.html new file mode 100644 index 0000000..059ab24 --- /dev/null +++ b/doc/deprecated-list.html @@ -0,0 +1,122 @@ + + + + + +Deprecated List + + + + + + + + +
+ + + + + + + +
+ + +
+

Deprecated API

+

Contents

+
+ +
+ + + + + + + +
+ + + + diff --git a/doc/help-doc.html b/doc/help-doc.html new file mode 100644 index 0000000..6a3f438 --- /dev/null +++ b/doc/help-doc.html @@ -0,0 +1,223 @@ + + + + + +API Help + + + + + + + + +
+ + + + + + + +
+ + +
+

How This API Document Is Organized

+
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+ +This help file applies to API documentation generated using the standard doclet.
+ +
+ + + + + + + +
+ + + + diff --git a/doc/index-files/index-1.html b/doc/index-files/index-1.html new file mode 100644 index 0000000..76798dd --- /dev/null +++ b/doc/index-files/index-1.html @@ -0,0 +1,131 @@ + + + + + +C-Index + + + + + + + + +
+ + + + + + + +
+ + +
C D G I L N O R  + + +

C

+
+
Core - Class in de.joethei.core
+
+
main class
+
+
Core() - Constructor for class de.joethei.core.Core
+
 
+
+C D G I L N O R 
+ +
+ + + + + + + +
+ + + + diff --git a/doc/index-files/index-2.html b/doc/index-files/index-2.html new file mode 100644 index 0000000..1db98a8 --- /dev/null +++ b/doc/index-files/index-2.html @@ -0,0 +1,127 @@ + + + + + +D-Index + + + + + + + + +
+ + + + + + + +
+ + +
C D G I L N O R  + + +

D

+
+
de.joethei.core - package de.joethei.core
+
 
+
+C D G I L N O R 
+ +
+ + + + + + + +
+ + + + diff --git a/doc/index-files/index-3.html b/doc/index-files/index-3.html new file mode 100644 index 0000000..de55811 --- /dev/null +++ b/doc/index-files/index-3.html @@ -0,0 +1,127 @@ + + + + + +G-Index + + + + + + + + +
+ + + + + + + +
+ + +
C D G I L N O R  + + +

G

+
+
getInstance() - Static method in class de.joethei.core.Core
+
 
+
+C D G I L N O R 
+ +
+ + + + + + + +
+ + + + diff --git a/doc/index-files/index-4.html b/doc/index-files/index-4.html new file mode 100644 index 0000000..27aaf7f --- /dev/null +++ b/doc/index-files/index-4.html @@ -0,0 +1,129 @@ + + + + + +I-Index + + + + + + + + +
+ + + + + + + +
+ + +
C D G I L N O R  + + +

I

+
+
instance - Static variable in class de.joethei.core.Core
+
+
plugin instance
+
+
+C D G I L N O R 
+ +
+ + + + + + + +
+ + + + diff --git a/doc/index-files/index-5.html b/doc/index-files/index-5.html new file mode 100644 index 0000000..a2f56d2 --- /dev/null +++ b/doc/index-files/index-5.html @@ -0,0 +1,127 @@ + + + + + +L-Index + + + + + + + + +
+ + + + + + + +
+ + +
C D G I L N O R  + + +

L

+
+
log(Level, String) - Static method in class de.joethei.core.Core
+
 
+
+C D G I L N O R 
+ +
+ + + + + + + +
+ + + + diff --git a/doc/index-files/index-6.html b/doc/index-files/index-6.html new file mode 100644 index 0000000..7fbac65 --- /dev/null +++ b/doc/index-files/index-6.html @@ -0,0 +1,129 @@ + + + + + +N-Index + + + + + + + + +
+ + + + + + + +
+ + +
C D G I L N O R  + + +

N

+
+
nicks - Static variable in class de.joethei.core.Core
+
+
nick names of players
+
+
+C D G I L N O R 
+ +
+ + + + + + + +
+ + + + diff --git a/doc/index-files/index-7.html b/doc/index-files/index-7.html new file mode 100644 index 0000000..d5b6618 --- /dev/null +++ b/doc/index-files/index-7.html @@ -0,0 +1,129 @@ + + + + + +O-Index + + + + + + + + +
+ + + + + + + +
+ + +
C D G I L N O R  + + +

O

+
+
onDisable() - Method in class de.joethei.core.Core
+
 
+
onEnable() - Method in class de.joethei.core.Core
+
 
+
+C D G I L N O R 
+ +
+ + + + + + + +
+ + + + diff --git a/doc/index-files/index-8.html b/doc/index-files/index-8.html new file mode 100644 index 0000000..8ac2797 --- /dev/null +++ b/doc/index-files/index-8.html @@ -0,0 +1,127 @@ + + + + + +R-Index + + + + + + + + +
+ + + + + + + +
+ + +
C D G I L N O R  + + +

R

+
+
returnSQL() - Static method in class de.joethei.core.Core
+
 
+
+C D G I L N O R 
+ +
+ + + + + + + +
+ + + + diff --git a/doc/index.html b/doc/index.html new file mode 100644 index 0000000..a466c7a --- /dev/null +++ b/doc/index.html @@ -0,0 +1,71 @@ + + + + + +Generated Documentation (Untitled) + + + + + + +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<h2>Frame Alert</h2> +<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="de/joethei/core/package-summary.html">Non-frame version</a>.</p> + + + diff --git a/doc/overview-tree.html b/doc/overview-tree.html new file mode 100644 index 0000000..c58e30a --- /dev/null +++ b/doc/overview-tree.html @@ -0,0 +1,143 @@ + + + + + +Class Hierarchy + + + + + + + + +
+ + + + + + + +
+ + +
+

Hierarchy For All Packages

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ +
+ + + + + + + +
+ + + + diff --git a/doc/package-list b/doc/package-list new file mode 100644 index 0000000..78cc531 --- /dev/null +++ b/doc/package-list @@ -0,0 +1 @@ +de.joethei.core diff --git a/doc/script.js b/doc/script.js new file mode 100644 index 0000000..c3a1cae --- /dev/null +++ b/doc/script.js @@ -0,0 +1,30 @@ +function show(type) +{ + count = 0; + for (var key in methods) { + var row = document.getElementById(key); + if ((methods[key] & type) != 0) { + row.style.display = ''; + row.className = (count++ % 2) ? rowColor : altColor; + } + else + row.style.display = 'none'; + } + updateTabs(type); +} + +function updateTabs(type) +{ + for (var value in tabs) { + var sNode = document.getElementById(tabs[value][0]); + var spanNode = sNode.firstChild; + if (value == type) { + sNode.className = activeTableTab; + spanNode.innerHTML = tabs[value][1]; + } + else { + sNode.className = tableTab; + spanNode.innerHTML = "" + tabs[value][1] + ""; + } + } +} diff --git a/doc/stylesheet.css b/doc/stylesheet.css new file mode 100644 index 0000000..b8dad08 --- /dev/null +++ b/doc/stylesheet.css @@ -0,0 +1,574 @@ +/* Javadoc style sheet */ +/* +Overall document style +*/ + +@import url('resources/fonts/dejavu.css'); + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a:hover, a:focus { + text-decoration:none; + color:#bb7a2a; +} +a:active { + text-decoration:none; + color:#4A6782; +} +a[name] { + color:#353833; +} +a[name]:hover { + text-decoration:none; + color:#353833; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; + font-style:italic; +} +h4 { + font-size:13px; +} +h5 { + font-size:12px; +} +h6 { + font-size:11px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +table tr td dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +/* +Document title and Copyright styles +*/ +.clear { + clear:both; + height:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:11px; + z-index:200; + margin-top:-9px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* +Navigation bar styles +*/ +.bar { + background-color:#4D7A97; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:11px; + margin:0; +} +.topNav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.bottomNav { + margin-top:10px; + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.subNav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +ul.subNavList li{ + list-style:none; + float:left; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.navBarCell1Rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skipNav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* +Page header and footer styles +*/ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexHeader { + margin:10px; + position:relative; +} +.indexHeader span{ + margin-right:15px; +} +.indexHeader h1 { + font-size:13px; +} +.title { + color:#2c4557; + margin:10px 0; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* +Heading styles +*/ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* +Page layout container styles +*/ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:12px; +} +.indexContainer h2 { + font-size:13px; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; + padding-top:2px; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:5px 0 10px 0px; + font-size:14px; + font-family:'DejaVu Sans Mono',monospace; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* +List styles +*/ +ul.horizontal li { + display:inline; + font-size:0.9em; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #ededed; + background-color:#f8f8f8; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* +Table styles +*/ +.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary { + width:100%; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; +} +.overviewSummary, .memberSummary { + padding:0px; +} +.overviewSummary caption, .memberSummary caption, .typeSummary caption, +.useSummary caption, .constantsSummary caption, .deprecatedSummary caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + padding-top:10px; + padding-left:1px; + margin:0px; + white-space:pre; +} +.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link, +.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link, +.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover, +.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover, +.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active, +.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active, +.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited, +.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited { + color:#FFFFFF; +} +.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span, +.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + padding-bottom:7px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} +.memberSummary caption span.activeTableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#F8981D; + height:16px; +} +.memberSummary caption span.tableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#4D7A97; + height:16px; +} +.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab { + padding-top:0px; + padding-left:0px; + padding-right:0px; + background-image:none; + float:none; + display:inline; +} +.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd, +.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd { + display:none; + width:5px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .activeTableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .tableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + background-color:#4D7A97; + float:left; + +} +.overviewSummary td, .memberSummary td, .typeSummary td, +.useSummary td, .constantsSummary td, .deprecatedSummary td { + text-align:left; + padding:0px 0px 12px 10px; +} +th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th, +td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{ + vertical-align:top; + padding-right:0px; + padding-top:8px; + padding-bottom:3px; +} +th.colFirst, th.colLast, th.colOne, .constantsSummary th { + background:#dee3e9; + text-align:left; + padding:8px 3px 3px 7px; +} +td.colFirst, th.colFirst { + white-space:nowrap; + font-size:13px; +} +td.colLast, th.colLast { + font-size:13px; +} +td.colOne, th.colOne { + font-size:13px; +} +.overviewSummary td.colFirst, .overviewSummary th.colFirst, +.useSummary td.colFirst, .useSummary th.colFirst, +.overviewSummary td.colOne, .overviewSummary th.colOne, +.memberSummary td.colFirst, .memberSummary th.colFirst, +.memberSummary td.colOne, .memberSummary th.colOne, +.typeSummary td.colFirst{ + width:25%; + vertical-align:top; +} +td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { + font-weight:bold; +} +.tableSubHeadingColor { + background-color:#EEEEFF; +} +.altColor { + background-color:#FFFFFF; +} +.rowColor { + background-color:#EEEEEF; +} +/* +Content styles +*/ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} + +ul.blockList ul.blockList ul.blockList li.blockList h3 { + font-style:normal; +} + +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} + +td.colLast div { + padding-top:0px; +} + + +td.colLast a { + padding-bottom:3px; +} +/* +Formatting effect styles +*/ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:3px 10px 2px 0px; + color:#474747; +} +.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink, +.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel, +.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink { + font-weight:bold; +} +.deprecationComment, .emphasizedPhrase, .interfaceName { + font-style:italic; +} + +div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase, +div.block div.block span.interfaceName { + font-style:normal; +} + +div.contentContainer ul.blockList li.blockList h2{ + padding-bottom:0px; +} diff --git a/src/de/joethei/core/Core.java b/src/de/joethei/core/Core.java index 12a341c..129c0a7 100644 --- a/src/de/joethei/core/Core.java +++ b/src/de/joethei/core/Core.java @@ -1,5 +1,6 @@ package de.joethei.core; +import java.io.IOException; import java.sql.SQLException; import java.util.HashMap; import java.util.logging.Level; @@ -50,7 +51,7 @@ public class Core extends JavaPlugin{ /** * mysql stuff */ - private static MySQL sql = new MySQL(getInstance(), Config.readString("MySQL.Host"), Config.readString("MySQL.Port"), Config.readString("MySQL.DB"), Config.readString("MySQL.User"), Config.readString("MySQL.Pass")); + private static MySQL sql = new MySQL(getInstance(), Config.readString("MySQL.Host"), Config.readString("MySQL.Port"), Config.readString("MySQL.DB"), Config.readString("MySQL.User"), Config.readString("MySQL.Pass") + "?autoReconnect=true"); /** * @return sql */ @@ -80,6 +81,11 @@ public class Core extends JavaPlugin{ public void onEnable() { Settings.setDebug(true); Settings.setBuild(true); + try { + Config.writeDefault(); + } catch (ClassNotFoundException | SQLException | IOException e1) { + e1.printStackTrace(); + } instance = this; if(Settings.isDebug()) log(Level.INFO, "Debug Modus aktiviert"); @@ -131,7 +137,7 @@ public class Core extends JavaPlugin{ MySQL tempSQL = sql; tempSQL.openConnection(); - tempSQL.getConnection().createStatement().execute("CREATE TABLE IF NOT EXISTS PlayerData(ID bigint PRIMARY KEY auto_increment, player_uuid varchar(50), FirstJoin TIMESTAMP default now(), Coins bigint, mute boolean, Rank varchar(10), nick boolean, FastMenu boolean, teleport boolean);"); + tempSQL.getConnection().createStatement().execute("CREATE TABLE IF NOT EXISTS PlayerData(ID bigint PRIMARY KEY auto_increment, player_uuid varchar(50), FirstJoin TIMESTAMP default now(), Coins bigint, mute boolean, Rank varchar(15), nick boolean, FastMenu boolean, teleport boolean);"); if(Settings.isDebug()) log(Level.INFO, "MySQL PlayerData ausgeführt"); tempSQL.getConnection().createStatement().execute("CREATE TABLE IF NOT EXISTS bans(ID bigint PRIMARY KEY auto_increment, player_uuid varchar(50), Reason varchar(50), who varchar(50));"); diff --git a/src/de/joethei/core/api/Config.java b/src/de/joethei/core/api/Config.java index 9086a9d..1d20917 100644 --- a/src/de/joethei/core/api/Config.java +++ b/src/de/joethei/core/api/Config.java @@ -35,6 +35,7 @@ public class Config { cfg.set("MySQL.User", "root");//best user name cfg.set("MySQL.Pass", "");//best password + cfg.options().copyDefaults(true); cfg.save(file); } diff --git a/src/de/joethei/core/api/Messages.java b/src/de/joethei/core/api/Messages.java index 947b765..a354fc7 100644 --- a/src/de/joethei/core/api/Messages.java +++ b/src/de/joethei/core/api/Messages.java @@ -21,6 +21,7 @@ public class Messages { public static String NOT_ONLINE; public static String KICK_RESTART; public static String KICK_FULL; + public static String COMMAND_NOT_FOUND; /** * write default data @@ -31,21 +32,43 @@ public class Messages { //editable messages will be set here, but do not edit this messages. MySQL sql = Core.returnSQL(); sql.openConnection(); - sql.getConnection().createStatement().execute("INSERT INTO MESSAGES(Ident, Message) values ('Prefix', '§aunivento §8»');"); - sql.getConnection().createStatement().execute("INSERT INTO Messages(Ident, Message) values ('ConsolePrefix', '[univento Core]');"); - sql.getConnection().createStatement().execute("INSERT INTO Messages(Ident, Message) values ('UnknownError', '§cEs ist leider ein unbekannter Fehler aufgetreten');"); - sql.getConnection().createStatement().execute("INSERT INTO Messages(Ident, Message) values ('Commands.NoPlayer', '§cDu bist leider kein Spieler');"); - sql.getConnection().createStatement().execute("INSERT INTO Messages(Ident, Message) values ('Commands.NoPerms', '§cDu hast keine Berechtigungen diesen Befehl auszuführen')"); - sql.getConnection().createStatement().execute("INSERT INTO Messages(Ident, Message) values ('Commands.Error', '§cBeim ausführen dieses Befehls ist ein Fehler aufgetreten');"); - sql.getConnection().createStatement().execute("INSERT INTO Messages(Ident, Message) values ('Commands.NotOnline', '§cDer Spieler $player ist nicht online');"); - sql.getConnection().createStatement().execute("INSERT INTO Messages(Ident, Message) values ('Commands.Unknown', '§6Der Befehl $cmd konnte leider nicht gefunden werden');"); - sql.getConnection().createStatement().execute("INSERT INTO Messages(Ident, Message) values ('Kick.Restart', '§cDer Server startet gerade neu');"); - sql.getConnection().createStatement().execute("INSERT INTO Messages(Ident, Message) values ('Kick.Full', '§cDer Server ist leider schon voll')"); + if(!isInDatabase("Prefix")) sql.getConnection().createStatement().execute("INSERT INTO MESSAGES(Ident, Message) values ('Prefix', '§aunivento §8»');"); + if(!isInDatabase("ConsolePrefix")) sql.getConnection().createStatement().execute("INSERT INTO Messages(Ident, Message) values ('ConsolePrefix', '[univento Core]');"); + if(!isInDatabase("UnknownError")) sql.getConnection().createStatement().execute("INSERT INTO Messages(Ident, Message) values ('UnknownError', '§cEs ist leider ein unbekannter Fehler aufgetreten');"); + if(!isInDatabase("Commands.NoPlayer")) sql.getConnection().createStatement().execute("INSERT INTO Messages(Ident, Message) values ('Commands.NoPlayer', '§cDu bist leider kein Spieler');"); + if(!isInDatabase("Commands.NoPerms")) sql.getConnection().createStatement().execute("INSERT INTO Messages(Ident, Message) values ('Commands.NoPerms', '§cDu hast keine Berechtigungen diesen Befehl auszuführen')"); + if(!isInDatabase("Commands.Error")) sql.getConnection().createStatement().execute("INSERT INTO Messages(Ident, Message) values ('Commands.Error', '§cBeim ausführen dieses Befehls ist ein Fehler aufgetreten');"); + if(!isInDatabase("Commands.NotOnline")) sql.getConnection().createStatement().execute("INSERT INTO Messages(Ident, Message) values ('Commands.NotOnline', '§cDer Spieler $player ist nicht online');"); + if(!isInDatabase("Commands.Unknown")) sql.getConnection().createStatement().execute("INSERT INTO Messages(Ident, Message) values ('Commands.Unknown', '§6Dieser Befehl konnte leider nicht gefunden werden');"); + if(!isInDatabase("Kick.Restart")) sql.getConnection().createStatement().execute("INSERT INTO Messages(Ident, Message) values ('Kick.Restart', '§cDer Server startet gerade neu');"); + if(!isInDatabase("Kick.Full")) sql.getConnection().createStatement().execute("INSERT INTO Messages(Ident, Message) values ('Kick.Full', '§cDer Server ist leider schon voll')"); sql.closeConnection(); } + /** + * checks if message is in database + * @param ident identifier of message + * @return true/false + */ + private static boolean isInDatabase(String ident) { + MySQL sql = Core.returnSQL(); + try { + sql.openConnection(); + ResultSet rs = sql.getConnection().createStatement().executeQuery("SELECT * FROM Messages WHERE Ident='" + ident + "';"); + if (!rs.next()) { + sql.closeConnection(); + return false; + } + sql.closeConnection(); + return true; + } catch (ClassNotFoundException | SQLException e) { + e.printStackTrace(); + return false; + } + } + /** * reads all string to variables * @throws ClassNotFoundException Class couldn't be found @@ -54,13 +77,14 @@ public class Messages { public static void readStrings() throws ClassNotFoundException, SQLException { PREFIX = readString("Prefix") + " "; CONSOLE_PREFIX = readString("ConsolePrefix") + " "; - UNKNOWN_ERROR = readString("UnknownError") + " "; - NOT_A_PLAYER = readString("Commands.NoPlayer") + " "; - NO_PERMS = readString("Commands.NoPerms") + " "; - ERROR = readString("Commands.Error") + " "; - NOT_ONLINE = readString("Commands.NotOnline") + " "; - KICK_RESTART = readString("Kick.Restart") + " "; - KICK_FULL = readString("Kick.Full") + " "; + UNKNOWN_ERROR = readString("UnknownError"); + NOT_A_PLAYER = readString("Commands.NoPlayer") ; + NO_PERMS = readString("Commands.NoPerms"); + ERROR = readString("Commands.Error"); + NOT_ONLINE = readString("Commands.NotOnline"); + KICK_RESTART = readString("Kick.Restart"); + KICK_FULL = readString("Kick.Full"); + COMMAND_NOT_FOUND = readString("Commands.Unkown"); } /** diff --git a/src/de/joethei/core/api/MojangService.java b/src/de/joethei/core/api/MojangService.java index 76ba579..50aab6a 100644 --- a/src/de/joethei/core/api/MojangService.java +++ b/src/de/joethei/core/api/MojangService.java @@ -1,120 +1,122 @@ package de.joethei.core.api; import java.io.BufferedReader; +import java.io.IOException; import java.io.InputStreamReader; import java.net.URL; + +import org.bukkit.ChatColor; import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; - -public class MojangService -{ - private static JSONParser parser = new JSONParser(); - - public static ServiceStatus getStatus(MinecraftServer service) - { - String status = null; - try - { - URL url = new URL("http://status.mojang.com/check?service=" + service.getURL()); - BufferedReader input = new BufferedReader(new InputStreamReader(url.openStream())); - - Object object = parser.parse(input); - JSONObject jsonObject = (JSONObject)object; - - status = (String)jsonObject.get(service.getURL()); - } catch (Exception e) { - return ServiceStatus.UNKNOWN; +import org.json.simple.parser.ParseException; + +public enum MojangService { + + ACCOUNTS("Accounts Service", "account.mojang.com"), + AUTHENTICATION("Authentication Service", "auth.mojang.com"), + AUTHENTICATION_SERVER("Authentication Server", "authserver.mojang.com"), + LOGIN("Login Service", "login.minecraft.net"), + SESSION_MINECRAFT("Minecraft Session Server", "session.minecraft.net"), + SESSION_MOJANG("Mojang Session Server", "sessionserver.mojang.com"), + SKINS("Skin Server", "skins.minecraft.net"), + MAIN_WEBSITE("Main Site", "minecraft.net"); + + /* + * @Author TheTinySpider + * Idea from: sebasju1234 + * + * Status names and other information can be found at: + * [url]http://minecraft.gamepedia.com/User_talk:Oxguy3/Minecraft.net_API[/url] + */ + + private String name, serviceURL; + private JSONParser jsonParser = new JSONParser(); + + MojangService(String name, String serviceURL) { + this.name = name; + this.serviceURL = serviceURL; } - - return status(status); - } - - public static ServiceStatus getStatus(MojangServer service) { - String status = null; - try - { - URL url = new URL("http://status.mojang.com/check?service=" + service.getURL()); - BufferedReader input = new BufferedReader(new InputStreamReader(url.openStream())); - - Object object = parser.parse(input); - JSONObject jsonObject = (JSONObject)object; - - status = (String)jsonObject.get(service.getURL()); - } catch (Exception e) { - return ServiceStatus.UNKNOWN; + + public String getName() { + return name; } - - return status(status); - } - - private static ServiceStatus status(String status) - { - String str; - switch ((str = status.toLowerCase()).hashCode()) { case -734239628: - if (str.equals("yellow")) break; break; - case 112785: - if (str.equals("red")); - case 98619139: - if ((goto 92) && (str.equals("green"))) - { - return ServiceStatus.ONLINE; - - return ServiceStatus.EXPERIENCE; - - return ServiceStatus.OFFLINE; - } + + /** + * Check the current Mojang service for it's status, errors are ignored. + * + * @return Status of the service. + */ + public Status getStatus() { + return getStatus(true); } - return ServiceStatus.UNKNOWN; - } - - public static enum MinecraftServer - { - WEBSITE("minecraft.net"), - LOGIN("login.minecraft.net"), - SKIN("skins.minecraft.net"), - SESSION("session.minecraft.net"); - - private String url; - - private MinecraftServer(String url) { this.url = url; } - - private String getURL() - { - return this.url; + + /** + * Check the current Mojang service for it's status. + * + * @param suppressErrors - Don't print errors in console. + * @return Status of the service. + */ + public Status getStatus(boolean suppressErrors) { + try { + URL url = new URL("[url]http://status.mojang.com/check?service=[/url]" + serviceURL); + BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(url.openStream())); + + Object object = jsonParser.parse(bufferedReader); + JSONObject jsonObject = (JSONObject) object; + + String status = (String) jsonObject.get(serviceURL); + + return Status.get(status); + + } catch (IOException | ParseException exception) { + + if (!suppressErrors) { + exception.printStackTrace(); + } + + return Status.UNKNOWN; + } } - } - - public static enum MojangServer - { - ACCOUNT("account.mojang.com"), - AUTH("auth.mojang.com"), - AUTHSERVER("authserver.mojang.com"), - SESSION("sessionserver.mojang.com"); - - private String url; - - private MojangServer(String url) { this.url = url; } - - private String getURL() - { - return this.url; + + public enum Status { + ONLINE("Online", ChatColor.GREEN.toString(), "No problems detected!"), + UNSTABLE("Unstable", ChatColor.YELLOW.toString(), "May be experiencing issues..."), + OFFLINE("Offline", ChatColor.DARK_RED.toString(), "Experiencing problems!"), + UNKNOWN("Unknown", ChatColor.WHITE.toString(), "Couldn't connect to Mojang!"); + + private String status, color, description; + + Status(String status, String color, String description) { + this.status = status; + this.color = color; + this.description = description; + } + + public String getStatus() { + return status; + } + + public String getColor() { + return color; + } + + public String getDescription() { + return description; + } + + public static Status get(String status) { + status = status.toLowerCase(); + + switch (status) { + case "green": + return Status.ONLINE; + case "yellow": + return Status.UNSTABLE; + case "red": + return Status.OFFLINE; + default: + return Status.UNKNOWN; + } + } } - } - - public static enum ServiceStatus - { - ONLINE("No problems detected!"), - EXPERIENCE("May be experiencing issues"), - OFFLINE("Experiencing problems!"), - UNKNOWN("Couldn't connect to Mojang!"); - - private String description; - - private ServiceStatus(String description) { this.description = description; } - - public String getDescription() - { - return this.description; - } - } } \ No newline at end of file diff --git a/src/de/joethei/core/api/Perms.java b/src/de/joethei/core/api/Perms.java index 993c348..a63fcc8 100644 --- a/src/de/joethei/core/api/Perms.java +++ b/src/de/joethei/core/api/Perms.java @@ -26,8 +26,8 @@ public class Perms{ public static String getPrefix(CustomPlayer p) { switch(p.getRank()) { case Admin: return "§7[§4Admin§7]§4 "; - case Developer: return "§7[§3Developer§7] §3 "; - case HeadBuild: return "§7[§aHead-Builder§7]§a "; + case Developer: return "§7[§3Developer§7]§3 "; + case HeadBuilder: return "§7[§aHead-Builder§7]§a "; case Builder: return "§7[§2Builder§7]§2 "; case Moderator: return "§7[§cModerator§7]§c "; case Supporter: return "§7[§bSupporter§7]§b "; @@ -47,13 +47,13 @@ public static String getSuffix(CustomPlayer p) { switch(p.getRank()) { case Admin: return " §8» §f§l"; case Developer: return " §8» §f§l"; - case HeadBuild: return " §8» §f§l"; + case HeadBuilder: return " §8» §f§l"; case Builder: return " §8» §f§l"; case Moderator: return " §8» §f§l"; case Supporter: return " §8» §f§l"; case Youtuber: return " §8» §f§l"; - case Premium: return " §8» §f§l"; - case Spieler: return " §8» §f§l"; + case Premium: return " §8» §f"; + case Spieler: return " §8» §f"; default: return "§cFehler"; } } @@ -67,7 +67,7 @@ public static String getColor(CustomPlayer p) { switch(p.getRank()) { case Admin: return "§4"; case Developer: return "§3"; - case HeadBuild: return "§a"; + case HeadBuilder: return "§a"; case Builder: return "§2"; case Moderator: return "§c"; case Supporter: return "§b"; @@ -144,7 +144,7 @@ public static boolean isAllowed(CustomPlayer p, Ranks r) throws ClassNotFoundExc public static enum Ranks{ Admin(9), Developer(8), - HeadBuild(7), + HeadBuilder(7), Builder(6), Moderator(5), Supporter(4), diff --git a/src/de/joethei/core/commands/SetRank.java b/src/de/joethei/core/commands/SetRank.java index 4a6b7ef..9957208 100644 --- a/src/de/joethei/core/commands/SetRank.java +++ b/src/de/joethei/core/commands/SetRank.java @@ -79,7 +79,7 @@ public class SetRank extends AutoCommand{ list.add("Admin"); list.add("Developer"); - list.add("HeadBuild"); + list.add("HeadBuilder"); list.add("Builder"); list.add("Moderator"); list.add("Supporter"); diff --git a/src/de/joethei/core/listeners/Chat.java b/src/de/joethei/core/listeners/Chat.java index 5087b03..65a6906 100644 --- a/src/de/joethei/core/listeners/Chat.java +++ b/src/de/joethei/core/listeners/Chat.java @@ -6,6 +6,7 @@ import org.bukkit.event.player.AsyncPlayerChatEvent; import de.joethei.core.api.CustomPlayer; import de.joethei.core.api.Settings; +import net.md_5.bungee.api.ChatColor; import de.joethei.core.api.Perms.Ranks; /** @@ -28,8 +29,13 @@ public class Chat implements Listener{ } } if(!p.isMuted()) { - String msg = p.getPrefix() + p.getDisplayName() + p.getSuffix() + e.getMessage(); - e.setFormat(msg); + String format; + if(p.isAllowed(Ranks.Supporter)) { + format = p.getPrefix() + p.getDisplayName() + p.getSuffix() + ChatColor.translateAlternateColorCodes('&', e.getMessage()); + }else { + format = p.getPrefix() + p.getDisplayName() + p.getSuffix() + e.getMessage(); + } + e.setFormat(format); }else { p.sendMessage("§cDu wurdest leider vom Chat ausgeschlossen"); } diff --git a/src/de/joethei/core/listeners/Commands.java b/src/de/joethei/core/listeners/Commands.java index 0c91510..8ca8533 100644 --- a/src/de/joethei/core/listeners/Commands.java +++ b/src/de/joethei/core/listeners/Commands.java @@ -32,8 +32,7 @@ public class Commands implements Listener{ String cmd = e.getMessage().split(" ")[0]; HelpTopic topic = Bukkit.getServer().getHelpMap().getHelpTopic(cmd); if(topic == null) { - String msg = Messages.readString("Commands.Unknown"); - msg = msg.replace("$cmd", cmd); + String msg = Messages.COMMAND_NOT_FOUND; p.sendMessage(msg); e.setCancelled(true); }