mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +00:00
[update] Remove GroupBridge
This commit is contained in:
parent
d9a6974ae2
commit
d2ee2e3646
18 changed files with 0 additions and 2849 deletions
|
@ -934,13 +934,6 @@ is divided into following sections:
|
||||||
<param name="call.target" value="jar"/>
|
<param name="call.target" value="jar"/>
|
||||||
<param name="transfer.built-jar.properties" value="${built-jar.properties}"/>
|
<param name="transfer.built-jar.properties" value="${built-jar.properties}"/>
|
||||||
</antcall>
|
</antcall>
|
||||||
<antcall target="-maybe-call-dep">
|
|
||||||
<param name="call.built.properties" value="${built-jar.properties}"/>
|
|
||||||
<param location="${project.EssentialsGroupBridge}" name="call.subproject"/>
|
|
||||||
<param location="${project.EssentialsGroupBridge}/build.xml" name="call.script"/>
|
|
||||||
<param name="call.target" value="jar"/>
|
|
||||||
<param name="transfer.built-jar.properties" value="${built-jar.properties}"/>
|
|
||||||
</antcall>
|
|
||||||
<antcall target="-maybe-call-dep">
|
<antcall target="-maybe-call-dep">
|
||||||
<param name="call.built.properties" value="${built-jar.properties}"/>
|
<param name="call.built.properties" value="${built-jar.properties}"/>
|
||||||
<param location="${project.EssentialsGroupManager}" name="call.subproject"/>
|
<param location="${project.EssentialsGroupManager}" name="call.subproject"/>
|
||||||
|
@ -1477,13 +1470,6 @@ is divided into following sections:
|
||||||
<param name="call.target" value="clean"/>
|
<param name="call.target" value="clean"/>
|
||||||
<param name="transfer.built-clean.properties" value="${built-clean.properties}"/>
|
<param name="transfer.built-clean.properties" value="${built-clean.properties}"/>
|
||||||
</antcall>
|
</antcall>
|
||||||
<antcall target="-maybe-call-dep">
|
|
||||||
<param name="call.built.properties" value="${built-clean.properties}"/>
|
|
||||||
<param location="${project.EssentialsGroupBridge}" name="call.subproject"/>
|
|
||||||
<param location="${project.EssentialsGroupBridge}/build.xml" name="call.script"/>
|
|
||||||
<param name="call.target" value="clean"/>
|
|
||||||
<param name="transfer.built-clean.properties" value="${built-clean.properties}"/>
|
|
||||||
</antcall>
|
|
||||||
<antcall target="-maybe-call-dep">
|
<antcall target="-maybe-call-dep">
|
||||||
<param name="call.built.properties" value="${built-clean.properties}"/>
|
<param name="call.built.properties" value="${built-clean.properties}"/>
|
||||||
<param location="${project.EssentialsGroupManager}" name="call.subproject"/>
|
<param location="${project.EssentialsGroupManager}" name="call.subproject"/>
|
||||||
|
|
|
@ -70,7 +70,6 @@ javac.classpath=\
|
||||||
${reference.EssentialsProtect.jar}:\
|
${reference.EssentialsProtect.jar}:\
|
||||||
${reference.EssentialsSpawn.jar}:\
|
${reference.EssentialsSpawn.jar}:\
|
||||||
${reference.EssentialsGeoIP.jar}:\
|
${reference.EssentialsGeoIP.jar}:\
|
||||||
${reference.EssentialsGroupBridge.jar}:\
|
|
||||||
${reference.EssentialsXMPP.jar}:\
|
${reference.EssentialsXMPP.jar}:\
|
||||||
${reference.EssentialsGroupManager.jar}
|
${reference.EssentialsGroupManager.jar}
|
||||||
# Space-separated list of extra javac options
|
# Space-separated list of extra javac options
|
||||||
|
@ -102,7 +101,6 @@ platform.active=default_platform
|
||||||
project.Essentials=../Essentials
|
project.Essentials=../Essentials
|
||||||
project.EssentialsChat=../EssentialsChat
|
project.EssentialsChat=../EssentialsChat
|
||||||
project.EssentialsGeoIP=../EssentialsGeoIP
|
project.EssentialsGeoIP=../EssentialsGeoIP
|
||||||
project.EssentialsGroupBridge=../EssentialsGroupBridge
|
|
||||||
project.EssentialsGroupManager=../EssentialsGroupManager
|
project.EssentialsGroupManager=../EssentialsGroupManager
|
||||||
project.EssentialsAntiBuild=../EssentialsAntiBuild
|
project.EssentialsAntiBuild=../EssentialsAntiBuild
|
||||||
project.EssentialsProtect=../EssentialsProtect
|
project.EssentialsProtect=../EssentialsProtect
|
||||||
|
@ -111,7 +109,6 @@ project.EssentialsXMPP=../EssentialsXMPP
|
||||||
reference.Essentials.jar=${project.Essentials}/dist/Essentials.jar
|
reference.Essentials.jar=${project.Essentials}/dist/Essentials.jar
|
||||||
reference.EssentialsChat.jar=${project.EssentialsChat}/dist/EssentialsChat.jar
|
reference.EssentialsChat.jar=${project.EssentialsChat}/dist/EssentialsChat.jar
|
||||||
reference.EssentialsGeoIP.jar=${project.EssentialsGeoIP}/dist/EssentialsGeoIP.jar
|
reference.EssentialsGeoIP.jar=${project.EssentialsGeoIP}/dist/EssentialsGeoIP.jar
|
||||||
reference.EssentialsGroupBridge.jar=${project.EssentialsGroupBridge}/dist/EssentialsGroupBridge.jar
|
|
||||||
reference.EssentialsGroupManager.jar=${project.EssentialsGroupManager}/dist/EssentialsGroupManager.jar
|
reference.EssentialsGroupManager.jar=${project.EssentialsGroupManager}/dist/EssentialsGroupManager.jar
|
||||||
reference.EssentialsAntiBuild.jar=${project.EssentialsAntiBuild}/dist/EssentialsAntiBuild.jar
|
reference.EssentialsAntiBuild.jar=${project.EssentialsAntiBuild}/dist/EssentialsAntiBuild.jar
|
||||||
reference.EssentialsProtect.jar=${project.EssentialsProtect}/dist/EssentialsProtect.jar
|
reference.EssentialsProtect.jar=${project.EssentialsProtect}/dist/EssentialsProtect.jar
|
||||||
|
|
|
@ -39,14 +39,6 @@
|
||||||
<clean-target>clean</clean-target>
|
<clean-target>clean</clean-target>
|
||||||
<id>jar</id>
|
<id>jar</id>
|
||||||
</reference>
|
</reference>
|
||||||
<reference>
|
|
||||||
<foreign-project>EssentialsGroupBridge</foreign-project>
|
|
||||||
<artifact-type>jar</artifact-type>
|
|
||||||
<script>build.xml</script>
|
|
||||||
<target>jar</target>
|
|
||||||
<clean-target>clean</clean-target>
|
|
||||||
<id>jar</id>
|
|
||||||
</reference>
|
|
||||||
<reference>
|
<reference>
|
||||||
<foreign-project>EssentialsGroupManager</foreign-project>
|
<foreign-project>EssentialsGroupManager</foreign-project>
|
||||||
<artifact-type>jar</artifact-type>
|
<artifact-type>jar</artifact-type>
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<classpath>
|
|
||||||
<classpathentry kind="src" path="src"/>
|
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
|
||||||
<classpathentry kind="lib" path="../lib/bukkit.jar"/>
|
|
||||||
<classpathentry combineaccessrules="false" kind="src" path="/EssentialsGroupManager"/>
|
|
||||||
<classpathentry kind="lib" path="../lib/Permissions3.jar"/>
|
|
||||||
<classpathentry kind="output" path="bin"/>
|
|
||||||
</classpath>
|
|
|
@ -1,27 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<projectDescription>
|
|
||||||
<name>EssentialsGroupBridge</name>
|
|
||||||
<comment></comment>
|
|
||||||
<projects>
|
|
||||||
</projects>
|
|
||||||
<buildSpec>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
|
|
||||||
<triggers>full,incremental,</triggers>
|
|
||||||
<arguments>
|
|
||||||
<dictionary>
|
|
||||||
<key>LaunchConfigHandle</key>
|
|
||||||
<value><project>/.externalToolBuilders/GroupBridge.launch</value>
|
|
||||||
</dictionary>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
</buildSpec>
|
|
||||||
<natures>
|
|
||||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
|
||||||
</natures>
|
|
||||||
</projectDescription>
|
|
|
@ -1,74 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!-- You may freely edit this file. See commented blocks below for -->
|
|
||||||
<!-- some examples of how to customize the build. -->
|
|
||||||
<!-- (If you delete it and reopen the project it will be recreated.) -->
|
|
||||||
<!-- By default, only the Clean and Build commands use this build script. -->
|
|
||||||
<!-- Commands such as Run, Debug, and Test only use this build script if -->
|
|
||||||
<!-- the Compile on Save feature is turned off for the project. -->
|
|
||||||
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
|
|
||||||
<!-- in the project's Project Properties dialog box.-->
|
|
||||||
<project name="EssentialsGroupBridge" default="default" basedir=".">
|
|
||||||
<description>Builds, tests, and runs the project EssentialsGroupBridge.</description>
|
|
||||||
<import file="nbproject/build-impl.xml"/>
|
|
||||||
<!--
|
|
||||||
|
|
||||||
There exist several targets which are by default empty and which can be
|
|
||||||
used for execution of your tasks. These targets are usually executed
|
|
||||||
before and after some main targets. They are:
|
|
||||||
|
|
||||||
-pre-init: called before initialization of project properties
|
|
||||||
-post-init: called after initialization of project properties
|
|
||||||
-pre-compile: called before javac compilation
|
|
||||||
-post-compile: called after javac compilation
|
|
||||||
-pre-compile-single: called before javac compilation of single file
|
|
||||||
-post-compile-single: called after javac compilation of single file
|
|
||||||
-pre-compile-test: called before javac compilation of JUnit tests
|
|
||||||
-post-compile-test: called after javac compilation of JUnit tests
|
|
||||||
-pre-compile-test-single: called before javac compilation of single JUnit test
|
|
||||||
-post-compile-test-single: called after javac compilation of single JUunit test
|
|
||||||
-pre-jar: called before JAR building
|
|
||||||
-post-jar: called after JAR building
|
|
||||||
-post-clean: called after cleaning build products
|
|
||||||
|
|
||||||
(Targets beginning with '-' are not intended to be called on their own.)
|
|
||||||
|
|
||||||
Example of inserting an obfuscator after compilation could look like this:
|
|
||||||
|
|
||||||
<target name="-post-compile">
|
|
||||||
<obfuscate>
|
|
||||||
<fileset dir="${build.classes.dir}"/>
|
|
||||||
</obfuscate>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
For list of available properties check the imported
|
|
||||||
nbproject/build-impl.xml file.
|
|
||||||
|
|
||||||
|
|
||||||
Another way to customize the build is by overriding existing main targets.
|
|
||||||
The targets of interest are:
|
|
||||||
|
|
||||||
-init-macrodef-javac: defines macro for javac compilation
|
|
||||||
-init-macrodef-junit: defines macro for junit execution
|
|
||||||
-init-macrodef-debug: defines macro for class debugging
|
|
||||||
-init-macrodef-java: defines macro for class execution
|
|
||||||
-do-jar-with-manifest: JAR building (if you are using a manifest)
|
|
||||||
-do-jar-without-manifest: JAR building (if you are not using a manifest)
|
|
||||||
run: execution of project
|
|
||||||
-javadoc-build: Javadoc generation
|
|
||||||
test-report: JUnit report generation
|
|
||||||
|
|
||||||
An example of overriding the target for project execution could look like this:
|
|
||||||
|
|
||||||
<target name="run" depends="EssentialsGroupBridge-impl.jar">
|
|
||||||
<exec dir="bin" executable="launcher.exe">
|
|
||||||
<arg file="${dist.jar}"/>
|
|
||||||
</exec>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
Notice that the overridden target depends on the jar target and not only on
|
|
||||||
the compile target as the regular run target does. Again, for a list of available
|
|
||||||
properties which you can use, check the target you are overriding in the
|
|
||||||
nbproject/build-impl.xml file.
|
|
||||||
|
|
||||||
-->
|
|
||||||
</project>
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,8 +0,0 @@
|
||||||
build.xml.data.CRC32=475c8f4d
|
|
||||||
build.xml.script.CRC32=674d9b15
|
|
||||||
build.xml.stylesheet.CRC32=28e38971@1.38.2.45
|
|
||||||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
|
||||||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
|
||||||
nbproject/build-impl.xml.data.CRC32=475c8f4d
|
|
||||||
nbproject/build-impl.xml.script.CRC32=09eb9643
|
|
||||||
nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46
|
|
|
@ -1,101 +0,0 @@
|
||||||
annotation.processing.enabled=true
|
|
||||||
annotation.processing.enabled.in.editor=false
|
|
||||||
annotation.processing.run.all.processors=true
|
|
||||||
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
|
|
||||||
application.title=EssentialsGroupBridge
|
|
||||||
application.vendor=gabrielcouto
|
|
||||||
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs=true
|
|
||||||
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width=2
|
|
||||||
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.spaces-per-tab=2
|
|
||||||
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.tab-size=2
|
|
||||||
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width=120
|
|
||||||
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.text-line-wrap=none
|
|
||||||
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.usedProfile=project
|
|
||||||
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.expand-tabs=true
|
|
||||||
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.indent-shift-width=4
|
|
||||||
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaces-per-tab=4
|
|
||||||
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.tab-size=4
|
|
||||||
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.text-limit-width=120
|
|
||||||
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.text-line-wrap=none
|
|
||||||
build.classes.dir=${build.dir}/classes
|
|
||||||
build.classes.excludes=**/*.java,**/*.form
|
|
||||||
# This directory is removed when the project is cleaned:
|
|
||||||
build.dir=build
|
|
||||||
build.generated.dir=${build.dir}/generated
|
|
||||||
build.generated.sources.dir=${build.dir}/generated-sources
|
|
||||||
# Only compile against the classpath explicitly listed here:
|
|
||||||
build.sysclasspath=ignore
|
|
||||||
build.test.classes.dir=${build.dir}/test/classes
|
|
||||||
build.test.results.dir=${build.dir}/test/results
|
|
||||||
# Uncomment to specify the preferred debugger connection transport:
|
|
||||||
#debug.transport=dt_socket
|
|
||||||
debug.classpath=\
|
|
||||||
${run.classpath}
|
|
||||||
debug.test.classpath=\
|
|
||||||
${run.test.classpath}
|
|
||||||
# This directory is removed when the project is cleaned:
|
|
||||||
dist.dir=dist
|
|
||||||
dist.jar=${dist.dir}/EssentialsGroupBridge.jar
|
|
||||||
dist.javadoc.dir=${dist.dir}/javadoc
|
|
||||||
endorsed.classpath=
|
|
||||||
excludes=
|
|
||||||
file.reference.bukkit.jar=../lib/bukkit.jar
|
|
||||||
includes=**
|
|
||||||
jar.archive.disabled=${jnlp.enabled}
|
|
||||||
jar.compress=true
|
|
||||||
jar.index=${jnlp.enabled}
|
|
||||||
javac.classpath=\
|
|
||||||
${reference.EssentialsGroupManager.jar}:\
|
|
||||||
${file.reference.bukkit.jar}
|
|
||||||
# Space-separated list of extra javac options
|
|
||||||
javac.compilerargs=
|
|
||||||
javac.deprecation=false
|
|
||||||
javac.processorpath=\
|
|
||||||
${javac.classpath}
|
|
||||||
javac.source=1.6
|
|
||||||
javac.target=1.6
|
|
||||||
javac.test.classpath=\
|
|
||||||
${javac.classpath}:\
|
|
||||||
${build.classes.dir}
|
|
||||||
javac.test.processorpath=\
|
|
||||||
${javac.test.classpath}
|
|
||||||
javadoc.additionalparam=
|
|
||||||
javadoc.author=false
|
|
||||||
javadoc.encoding=${source.encoding}
|
|
||||||
javadoc.noindex=false
|
|
||||||
javadoc.nonavbar=false
|
|
||||||
javadoc.notree=false
|
|
||||||
javadoc.private=false
|
|
||||||
javadoc.splitindex=true
|
|
||||||
javadoc.use=true
|
|
||||||
javadoc.version=false
|
|
||||||
javadoc.windowtitle=
|
|
||||||
jnlp.codebase.type=no.codebase
|
|
||||||
jnlp.descriptor=application
|
|
||||||
jnlp.enabled=false
|
|
||||||
jnlp.mixed.code=default
|
|
||||||
jnlp.offline-allowed=false
|
|
||||||
jnlp.signed=false
|
|
||||||
jnlp.signing=
|
|
||||||
jnlp.signing.alias=
|
|
||||||
jnlp.signing.keystore=
|
|
||||||
main.class=
|
|
||||||
manifest.file=manifest.mf
|
|
||||||
meta.inf.dir=${src.dir}/META-INF
|
|
||||||
mkdist.disabled=true
|
|
||||||
platform.active=default_platform
|
|
||||||
project.EssentialsGroupManager=../EssentialsGroupManager
|
|
||||||
reference.EssentialsGroupManager.jar=${project.EssentialsGroupManager}/dist/EssentialsGroupManager.jar
|
|
||||||
run.classpath=\
|
|
||||||
${javac.classpath}:\
|
|
||||||
${build.classes.dir}
|
|
||||||
# Space-separated list of JVM arguments used when running the project
|
|
||||||
# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
|
|
||||||
# or test-sys-prop.name=value to set system properties for unit tests):
|
|
||||||
run.jvmargs=
|
|
||||||
run.test.classpath=\
|
|
||||||
${javac.test.classpath}:\
|
|
||||||
${build.test.classes.dir}
|
|
||||||
source.encoding=UTF-8
|
|
||||||
src.dir=src
|
|
||||||
test.src.dir=test
|
|
|
@ -1,25 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
|
||||||
<type>org.netbeans.modules.java.j2seproject</type>
|
|
||||||
<configuration>
|
|
||||||
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
|
|
||||||
<name>EssentialsGroupBridge</name>
|
|
||||||
<source-roots>
|
|
||||||
<root id="src.dir"/>
|
|
||||||
</source-roots>
|
|
||||||
<test-roots>
|
|
||||||
<root id="test.src.dir"/>
|
|
||||||
</test-roots>
|
|
||||||
</data>
|
|
||||||
<references xmlns="http://www.netbeans.org/ns/ant-project-references/1">
|
|
||||||
<reference>
|
|
||||||
<foreign-project>EssentialsGroupManager</foreign-project>
|
|
||||||
<artifact-type>jar</artifact-type>
|
|
||||||
<script>build.xml</script>
|
|
||||||
<target>jar</target>
|
|
||||||
<clean-target>clean</clean-target>
|
|
||||||
<id>jar</id>
|
|
||||||
</reference>
|
|
||||||
</references>
|
|
||||||
</configuration>
|
|
||||||
</project>
|
|
|
@ -1,5 +0,0 @@
|
||||||
package com.nijiko.permissions;
|
|
||||||
|
|
||||||
public class Entry {
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
package com.nijiko.permissions;
|
|
||||||
|
|
||||||
public class Group extends Entry {
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,458 +0,0 @@
|
||||||
package com.nijiko.permissions;
|
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Comparator;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Permissions 3.0
|
|
||||||
* Copyright (C) 2011 Matt 'The Yeti' Burnett <admin@theyeticave.net>
|
|
||||||
* Original Credit & Copyright (C) 2010 Nijikokun <nijikokun@gmail.com>
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Permissions Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Permissions Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Permissions Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
public abstract class PermissionHandler {
|
|
||||||
//World config manipulation methods
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the default world that is loaded on startup.
|
|
||||||
* @param world World to load on startup
|
|
||||||
*/
|
|
||||||
public abstract void setDefaultWorld(String world);
|
|
||||||
/**
|
|
||||||
* Check if world is loaded.
|
|
||||||
* A world is considered as loaded if there exists a user/group storage for it or it mirrors another world.
|
|
||||||
* @param world Target world
|
|
||||||
* @return Whether the world is loaded.
|
|
||||||
*/
|
|
||||||
public abstract boolean checkWorld(String world);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Attempts to load a world. If the world is already loaded, nothing happens.
|
|
||||||
* @param world World to load
|
|
||||||
* @return Whether world isn't already loaded
|
|
||||||
* @throws Exception Any exception that may occur when loading the world.
|
|
||||||
*/
|
|
||||||
public abstract boolean loadWorld(String world) throws Exception;
|
|
||||||
/**
|
|
||||||
* Forces a load of the world.
|
|
||||||
* @param world World to load
|
|
||||||
* @throws Exception Any exception that may occur when loading the world.
|
|
||||||
*/
|
|
||||||
public abstract void forceLoadWorld(String world) throws Exception;
|
|
||||||
/**
|
|
||||||
* Returns a set of the names all loaded worlds.
|
|
||||||
* A world is considered as loaded if there exists a user/group storage for it or it mirrors another world.
|
|
||||||
* @return Set of the names all loaded worlds.
|
|
||||||
*/
|
|
||||||
public abstract Set<String> getWorlds();
|
|
||||||
/**
|
|
||||||
* Loads the default world and global permissions.
|
|
||||||
* @throws Exception Any exception that may occur when loading the worlds.
|
|
||||||
*/
|
|
||||||
public abstract void load() throws Exception;
|
|
||||||
/**
|
|
||||||
* Reloads all worlds
|
|
||||||
*/
|
|
||||||
public abstract void reload();
|
|
||||||
/**
|
|
||||||
* Reloads the specified world
|
|
||||||
* @param world Name of target world
|
|
||||||
* @return False if world is not loaded, true otherwise
|
|
||||||
*/
|
|
||||||
public abstract boolean reload(String world);
|
|
||||||
/**
|
|
||||||
* Forces all storages to save,
|
|
||||||
*/
|
|
||||||
public abstract void saveAll();
|
|
||||||
/**
|
|
||||||
* This method forces a save of the specified world
|
|
||||||
* @param world Name of target world
|
|
||||||
*/
|
|
||||||
public abstract void save(String world);
|
|
||||||
/**
|
|
||||||
* Forces all storages to close.
|
|
||||||
*/
|
|
||||||
public abstract void closeAll();
|
|
||||||
|
|
||||||
//Permission-checking methods
|
|
||||||
/**
|
|
||||||
* This is an alias for permission(Player, String).
|
|
||||||
* @param player Target player
|
|
||||||
* @param node Permission node
|
|
||||||
* @return True if the player has the specified node, false otherwise
|
|
||||||
*/
|
|
||||||
public abstract boolean has(Player player, String node);
|
|
||||||
/**
|
|
||||||
* This is an alias for permission(String, String, String).
|
|
||||||
* @param worldName Target world (may be different from player's current world)
|
|
||||||
* @param playerName Player's name
|
|
||||||
* @param node Permission node
|
|
||||||
* @return True if the player has the specified node, false otherwise
|
|
||||||
*/
|
|
||||||
public abstract boolean has(String worldName, String playerName, String node);
|
|
||||||
/**
|
|
||||||
* This method checks if the player has the given permissions in his/her current world.
|
|
||||||
* In other words, this calls permissions(player.getWorld().getName(), player.getName(), node).
|
|
||||||
* @param player Target player
|
|
||||||
* @param node Permission node
|
|
||||||
* @return True if the player has the specified node, false otherwise
|
|
||||||
*/
|
|
||||||
public abstract boolean permission(Player player, String node);
|
|
||||||
/**
|
|
||||||
* This method checks if the player has the given permissions in the given world.
|
|
||||||
* @param worldName Target world (may be different from player's current world)
|
|
||||||
* @param playerName Player's name
|
|
||||||
* @param node Permission node
|
|
||||||
* @return True if the player has the specified node, false otherwise
|
|
||||||
*/
|
|
||||||
public abstract boolean permission(String worldName, String playerName, String node);
|
|
||||||
|
|
||||||
//Permission-manipulation methods
|
|
||||||
/**
|
|
||||||
* Adds the given permission to the targeted player.
|
|
||||||
* @param world Target world (may be different from player's current world)
|
|
||||||
* @param user Player's name
|
|
||||||
* @param node Permission node
|
|
||||||
*/
|
|
||||||
public abstract void addUserPermission(String world, String user, String node);
|
|
||||||
/**
|
|
||||||
* Removes the given permission from the targeted player.
|
|
||||||
* @param world Target world (may be different from player's current world)
|
|
||||||
* @param user Player's name
|
|
||||||
* @param node Permission node
|
|
||||||
*/
|
|
||||||
public abstract void removeUserPermission(String world, String user, String node);
|
|
||||||
/**
|
|
||||||
* Adds the given permission to the targeted group.
|
|
||||||
* @param world Target world
|
|
||||||
* @param user Group's name
|
|
||||||
* @param node Permission node
|
|
||||||
*/
|
|
||||||
public abstract void addGroupPermission(String world, String user, String node);
|
|
||||||
/**
|
|
||||||
* Removes the given permission from the targeted group.
|
|
||||||
* @param world Target world
|
|
||||||
* @param user Group's name
|
|
||||||
* @param node Permission node
|
|
||||||
*/
|
|
||||||
public abstract void removeGroupPermission(String world, String user, String node);
|
|
||||||
|
|
||||||
//Chat, prefix, suffix, build methods
|
|
||||||
/**
|
|
||||||
* Retrieves the properly-capitalised version of the given group's name.
|
|
||||||
* Returns an empty string if group does not exist.
|
|
||||||
* @param world Group's world
|
|
||||||
* @param group Group's name (any capitalisation)
|
|
||||||
* @return Group's properly-capitalised name.
|
|
||||||
*/
|
|
||||||
public abstract String getGroupProperName(String world, String group);
|
|
||||||
/**
|
|
||||||
* Gets the appropriate prefix for the user.
|
|
||||||
* This method is a utility method for chat plugins to get the user's prefix
|
|
||||||
* without having to look at every one of the user's ancestors.
|
|
||||||
* Returns an empty string if user has no parent groups.
|
|
||||||
* @param world Player's world
|
|
||||||
* @param user Player's name
|
|
||||||
* @return Player's prefix
|
|
||||||
*/
|
|
||||||
public abstract String getUserPrefix(String world, String user);
|
|
||||||
/**
|
|
||||||
* Gets the appropriate suffix for the user.
|
|
||||||
* This method is a utility method for chat plugins to get the user's suffix
|
|
||||||
* without having to look at every one of the user's ancestors.
|
|
||||||
* Returns an empty string if user has no parent groups.
|
|
||||||
* @param world Player's world
|
|
||||||
* @param user Player's name
|
|
||||||
* @return Player's suffix
|
|
||||||
*/
|
|
||||||
public abstract String getUserSuffix(String world, String user);
|
|
||||||
/**
|
|
||||||
* Gets the primary group of the user.
|
|
||||||
* Returns the default group if user has no parent groups,
|
|
||||||
* or null if there is no default group for that world.
|
|
||||||
* @param world Player's world
|
|
||||||
* @param user Player's name
|
|
||||||
* @return Player's primary group
|
|
||||||
*/
|
|
||||||
public abstract Group getPrimaryGroupObject(String world, String user);
|
|
||||||
/**
|
|
||||||
* Gets name of the primary group of the user.
|
|
||||||
* Returns the name of the default group if user has no parent groups,
|
|
||||||
* or "Default" if there is no default group for that world.
|
|
||||||
* @param world Player's world
|
|
||||||
* @param user Player's name
|
|
||||||
* @return Name of player's primary group
|
|
||||||
*/
|
|
||||||
public abstract String getPrimaryGroup(String world, String user);
|
|
||||||
/**
|
|
||||||
* Check if user can build.
|
|
||||||
* @param world Player's world
|
|
||||||
* @param user Player's name
|
|
||||||
* @return Whether the user can build
|
|
||||||
*/
|
|
||||||
public abstract boolean canUserBuild(String world, String user);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Retrieves group's raw prefix, inheritance not included.
|
|
||||||
* Will return an empty string if no prefix is defined for the group.
|
|
||||||
* @param world Group's world
|
|
||||||
* @param group Group's name
|
|
||||||
* @return The prefix defined for the group, empty string if prefix is not defined.
|
|
||||||
*/
|
|
||||||
public abstract String getGroupRawPrefix(String world, String group);
|
|
||||||
/**
|
|
||||||
* Retrieves group's raw suffix, inheritance not included.
|
|
||||||
* Will return an empty string if no suffix is defined for the group.
|
|
||||||
* @param world Group's world
|
|
||||||
* @param group Group's name
|
|
||||||
* @return The suffix defined for the group, empty string if suffix is not defined.
|
|
||||||
*/
|
|
||||||
public abstract String getGroupRawSuffix(String world, String group);
|
|
||||||
/**
|
|
||||||
* Retrieves group's build setting, inheritance not included.
|
|
||||||
* @param world Group's world
|
|
||||||
* @param group Group's name
|
|
||||||
* @return Returns group's build setting.
|
|
||||||
*/
|
|
||||||
public abstract boolean canGroupRawBuild(String world, String group);
|
|
||||||
|
|
||||||
//Entry methods
|
|
||||||
/**
|
|
||||||
* Returns the user object defined by the given world and name.
|
|
||||||
* This method attempts to create the object if it does not exist.
|
|
||||||
* @param world User's world
|
|
||||||
* @param name User's name
|
|
||||||
* @return User object
|
|
||||||
* @throws Exception An exception when creating the user object
|
|
||||||
*/
|
|
||||||
public abstract User safeGetUser(String world, String name) throws Exception;
|
|
||||||
/**
|
|
||||||
* Returns the group object defined by the given world and name.
|
|
||||||
* This method attempts to create the object if it does not exist.
|
|
||||||
* @param world Group's world
|
|
||||||
* @param name Group's name
|
|
||||||
* @return Group object
|
|
||||||
* @throws Exception An exception when creating the group object
|
|
||||||
*/
|
|
||||||
public abstract Group safeGetGroup(String world, String name) throws Exception;
|
|
||||||
/**
|
|
||||||
* Returns the user object defined by the given world and name.
|
|
||||||
* This method will return null if the object does not exist.
|
|
||||||
* @param world User's world
|
|
||||||
* @param name User's name
|
|
||||||
* @return User object, or null if it doesn't exist
|
|
||||||
*/
|
|
||||||
public abstract User getUserObject(String world, String name);
|
|
||||||
/**
|
|
||||||
* Returns the group object defined by the given world and name.
|
|
||||||
* This method will return null if the object does not exist.
|
|
||||||
* @param world Group's world
|
|
||||||
* @param name Group's name
|
|
||||||
* @return Group object, or null if it doesn't exist
|
|
||||||
*/
|
|
||||||
public abstract Group getGroupObject(String world, String name);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the group object representing the default group of the given world.
|
|
||||||
* This method will return null if the object does not exist or the world has no default group.
|
|
||||||
* @param world Target world
|
|
||||||
* @return Group object representing default world, or null if it doesn't exist or is not defined.
|
|
||||||
*/
|
|
||||||
public abstract Group getDefaultGroup(String world);
|
|
||||||
/**
|
|
||||||
* Returns all the user objects in the world.
|
|
||||||
* Will return null if world does not exist.
|
|
||||||
* @param world Target world
|
|
||||||
* @return Collection of all user objects belonging to the world.
|
|
||||||
*/
|
|
||||||
public abstract Collection<User> getUsers(String world);
|
|
||||||
/**
|
|
||||||
* Returns all the group objects in the world.
|
|
||||||
* Will return null if world does not exist.
|
|
||||||
* @param world Target world
|
|
||||||
* @return Collection of all group objects belonging to the world.
|
|
||||||
*/
|
|
||||||
public abstract Collection<Group> getGroups(String world);
|
|
||||||
|
|
||||||
//Parent-related methods
|
|
||||||
public abstract Set<String> getTracks(String world);
|
|
||||||
/**
|
|
||||||
* Checks if user is in specified group. Includes inherited groups.
|
|
||||||
* @param world World of both the user and the group
|
|
||||||
* @param user User's name
|
|
||||||
* @param group Parent group's name
|
|
||||||
* @return Whether user is a child of the specified group
|
|
||||||
*/
|
|
||||||
public abstract boolean inGroup(String world, String user, String group);
|
|
||||||
/**
|
|
||||||
* Checks if user is in specified group. Includes inherited groups.
|
|
||||||
* @param world User's world
|
|
||||||
* @param user User's name
|
|
||||||
* @param groupWorld Parent group's world
|
|
||||||
* @param group Parent group's name
|
|
||||||
* @return Whether user is a child of the specified group
|
|
||||||
*/
|
|
||||||
public abstract boolean inGroup(String world, String user, String groupWorld, String group);
|
|
||||||
/**
|
|
||||||
* Checks if user is in specified group, not counting inherited parents.
|
|
||||||
* @param world World of both the user and the group
|
|
||||||
* @param user User's name
|
|
||||||
* @param group Parent group's name
|
|
||||||
* @return Whether user is a child of the specified group
|
|
||||||
*/
|
|
||||||
public abstract boolean inSingleGroup(String world, String user, String group);
|
|
||||||
/**
|
|
||||||
* Checks if user is in specified group, not counting inherited parents.
|
|
||||||
* @param world User's world
|
|
||||||
* @param user User's name
|
|
||||||
* @param groupWorld Parent group's world
|
|
||||||
* @param group Parent group's name
|
|
||||||
* @return Whether user is a child of the specified group
|
|
||||||
*/
|
|
||||||
public abstract boolean inSingleGroup(String world, String user, String groupWorld, String group);
|
|
||||||
/**
|
|
||||||
* Gets a array of the names of all parent groups in the same world.
|
|
||||||
* @param world Target user's world
|
|
||||||
* @param name Target user's name
|
|
||||||
* @return An array containing the names of all parent groups (including ancestors) that are in the same world
|
|
||||||
*/
|
|
||||||
public abstract String[] getGroups(String world, String name);
|
|
||||||
/**
|
|
||||||
* Gets a map of world name to all parent groups of the target user in that world.
|
|
||||||
* @param world Target user's world
|
|
||||||
* @param name Target user's name
|
|
||||||
* @return Map of world name to set of groups that the user inherits from in the world.
|
|
||||||
*/
|
|
||||||
public abstract Map<String, Set<String>> getAllGroups(String world, String name);
|
|
||||||
|
|
||||||
//Weight-related methods
|
|
||||||
/**
|
|
||||||
* Compare the weights of two users.
|
|
||||||
* This method is for plugin devs to compare whether a user can do an action to another user.
|
|
||||||
* For example, SlapPlugin can compare the weights of two users when one of them wants to /slap the other.
|
|
||||||
* It can decide whether to allow the slap using the result of this function.
|
|
||||||
* @param firstWorld First user's world
|
|
||||||
* @param first First user's name
|
|
||||||
* @param secondWorld Second user's world
|
|
||||||
* @param second Second user's name
|
|
||||||
* @return -1 if firstWeight < secondWeight, 0 if firstWeight == secondWeight, 1 if firstWeight > secondWeight
|
|
||||||
*/
|
|
||||||
public abstract int compareWeights(String firstWorld, String first, String secondWorld, String second);
|
|
||||||
/**
|
|
||||||
* Alias for compareWeights(world, first, world, second).
|
|
||||||
* @param world World
|
|
||||||
* @param first First user's name
|
|
||||||
* @param second Second user's name
|
|
||||||
* @return -1 if firstWeight < secondWeight, 0 if firstWeight == secondWeight, 1 if firstWeight > secondWeight
|
|
||||||
*/
|
|
||||||
public abstract int compareWeights(String world, String first, String second);
|
|
||||||
|
|
||||||
//Data-related methods
|
|
||||||
public abstract String getRawInfoString(String world, String entryName, String path,boolean isGroup);
|
|
||||||
|
|
||||||
public abstract Integer getRawInfoInteger(String world, String entryName, String path, boolean isGroup);
|
|
||||||
|
|
||||||
public abstract Double getRawInfoDouble(String world, String entryName, String path, boolean isGroup);
|
|
||||||
|
|
||||||
public abstract Boolean getRawInfoBoolean(String world, String entryName, String path, boolean isGroup);
|
|
||||||
|
|
||||||
|
|
||||||
public abstract String getInfoString(String world, String entryName, String path,boolean isGroup);
|
|
||||||
public abstract String getInfoString(String world, String entryName, String path, boolean isGroup, Comparator<String> comparator);
|
|
||||||
|
|
||||||
public abstract Integer getInfoInteger(String world, String entryName, String path, boolean isGroup);
|
|
||||||
public abstract Integer getInfoInteger(String world, String entryName, String path, boolean isGroup, Comparator<Integer> comparator);
|
|
||||||
|
|
||||||
public abstract Double getInfoDouble(String world, String entryName, String path, boolean isGroup);
|
|
||||||
public abstract Double getInfoDouble(String world, String entryName, String path, boolean isGroup, Comparator<Double> comparator);
|
|
||||||
|
|
||||||
public abstract Boolean getInfoBoolean(String world, String entryName, String path, boolean isGroup);
|
|
||||||
public abstract Boolean getInfoBoolean(String world, String entryName, String path, boolean isGroup, Comparator<Boolean> comparator);
|
|
||||||
|
|
||||||
|
|
||||||
public abstract void addUserInfo(String world, String name, String path, Object data);
|
|
||||||
public abstract void removeUserInfo(String world, String name, String path);
|
|
||||||
public abstract void addGroupInfo(String world, String name, String path, Object data);
|
|
||||||
public abstract void removeGroupInfo(String world, String name, String path);
|
|
||||||
|
|
||||||
//Legacy methods
|
|
||||||
@Deprecated
|
|
||||||
public abstract String getGroupPermissionString(String world, String group, String path);
|
|
||||||
@Deprecated
|
|
||||||
public abstract int getGroupPermissionInteger(String world, String group, String path);
|
|
||||||
@Deprecated
|
|
||||||
public abstract boolean getGroupPermissionBoolean(String world, String group, String path);
|
|
||||||
@Deprecated
|
|
||||||
public abstract double getGroupPermissionDouble(String world, String group, String path);
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public abstract String getUserPermissionString(String world, String group, String path);
|
|
||||||
@Deprecated
|
|
||||||
public abstract int getUserPermissionInteger(String world, String group, String path);
|
|
||||||
@Deprecated
|
|
||||||
public abstract boolean getUserPermissionBoolean(String world, String group, String path);
|
|
||||||
@Deprecated
|
|
||||||
public abstract double getUserPermissionDouble(String world, String group, String path);
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public abstract String getPermissionString(String world, String group, String path);
|
|
||||||
@Deprecated
|
|
||||||
public abstract int getPermissionInteger(String world, String group, String path);
|
|
||||||
@Deprecated
|
|
||||||
public abstract boolean getPermissionBoolean(String world, String group, String path);
|
|
||||||
@Deprecated
|
|
||||||
public abstract double getPermissionDouble(String world, String group, String path);
|
|
||||||
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public abstract String getGroup(String world, String group);
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public abstract String getGroupPrefix(String world, String group);
|
|
||||||
@Deprecated
|
|
||||||
public abstract String getGroupSuffix(String world, String group);
|
|
||||||
@Deprecated
|
|
||||||
public abstract boolean canGroupBuild(String world, String group);
|
|
||||||
|
|
||||||
//Cache methods are no longer available
|
|
||||||
// @Deprecated
|
|
||||||
// public void setCache(String world, Map<String, Boolean> Cache) {
|
|
||||||
// }
|
|
||||||
// @Deprecated
|
|
||||||
// public void setCacheItem(String world, String player, String permission, boolean data){
|
|
||||||
// }
|
|
||||||
// @Deprecated
|
|
||||||
// public Map<String, Boolean> getCache(String world){
|
|
||||||
// return null;
|
|
||||||
// }
|
|
||||||
// @Deprecated
|
|
||||||
// public boolean getCacheItem(String world, String player, String permission){
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// @Deprecated
|
|
||||||
// public void removeCachedItem(String world, String player, String permission){
|
|
||||||
// }
|
|
||||||
// @Deprecated
|
|
||||||
// public void clearCache(String world){
|
|
||||||
// }
|
|
||||||
// @Deprecated
|
|
||||||
// public void clearAllCache(){
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
package com.nijiko.permissions;
|
|
||||||
|
|
||||||
public class User extends Entry {
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,25 +0,0 @@
|
||||||
package com.nijikokun.bukkit.Permissions;
|
|
||||||
|
|
||||||
import org.bukkit.event.EventHandler;
|
|
||||||
import org.bukkit.event.EventPriority;
|
|
||||||
import org.bukkit.event.server.PluginEnableEvent;
|
|
||||||
import org.bukkit.event.Listener;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class OverrideListener implements Listener {
|
|
||||||
|
|
||||||
Permissions permClass;
|
|
||||||
|
|
||||||
OverrideListener(Permissions instance) {
|
|
||||||
this.permClass = instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.NORMAL)
|
|
||||||
public void onPluginEnable(PluginEnableEvent event) {
|
|
||||||
if (event.getPlugin().getDescription().getName().equals("GroupManager")) {
|
|
||||||
permClass.setGM(event.getPlugin());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,75 +0,0 @@
|
||||||
package com.nijikokun.bukkit.Permissions;
|
|
||||||
|
|
||||||
import com.nijiko.permissions.PermissionHandler;
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
//import org.anjocaido.groupmanager.GroupManager;
|
|
||||||
import org.anjocaido.groupmanager.permissions.NijikoPermissionsProxy;
|
|
||||||
import org.bukkit.plugin.Plugin;
|
|
||||||
import org.bukkit.plugin.PluginDescriptionFile;
|
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
|
||||||
|
|
||||||
public class Permissions extends JavaPlugin {
|
|
||||||
|
|
||||||
public static final Logger log = Logger.getLogger("Fake Permissions");
|
|
||||||
public static String name = "Permissions";
|
|
||||||
public static String codename = "Hacked Permissions by AnjoCaido";
|
|
||||||
public static String version = "2.0";
|
|
||||||
public static PermissionHandler Security = null;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onDisable() {
|
|
||||||
PluginDescriptionFile pdfFile = this.getDescription();
|
|
||||||
System.out.println("Fake " + pdfFile.getName() + " version " + pdfFile.getVersion() + " is disabled!");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onEnable() {
|
|
||||||
PluginDescriptionFile pdfFile = this.getDescription();
|
|
||||||
|
|
||||||
if (Security == null) {
|
|
||||||
//make sure we have only one instance
|
|
||||||
Security = new NijikoPermissionsProxy(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
Plugin p = (this.getServer() == null) ? null : this.getServer().getPluginManager().getPlugin("GroupManager");
|
|
||||||
if (p != null) {
|
|
||||||
if (p.isEnabled()) {
|
|
||||||
setGM(p);
|
|
||||||
} else {
|
|
||||||
if (this.getServer() != null) {
|
|
||||||
this.getServer().getPluginManager().registerEvents(new OverrideListener(this), this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
System.err.println("OOOPS! Fake " + pdfFile.getName() + " version " + pdfFile.getVersion() + " couldn't find GroupManager!");
|
|
||||||
this.getPluginLoader().disablePlugin(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pdfFile != null) {
|
|
||||||
System.out.println("Fake " + pdfFile.getName() + " version " + pdfFile.getVersion() + " is enabled!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setGM(final Plugin p) {
|
|
||||||
//GroupManager groupManager = (GroupManager) p;
|
|
||||||
((NijikoPermissionsProxy) Security).setGM(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
public PermissionHandler getHandler() {
|
|
||||||
if (Security == null) {
|
|
||||||
Security = new NijikoPermissionsProxy(null);
|
|
||||||
}
|
|
||||||
return Security;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setupPermissions() {
|
|
||||||
if (Security == null) {
|
|
||||||
Security = new NijikoPermissionsProxy(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -1,588 +0,0 @@
|
||||||
/*
|
|
||||||
* To change this template, choose Tools | Templates
|
|
||||||
* and open the template in the editor.
|
|
||||||
*/
|
|
||||||
package org.anjocaido.groupmanager.permissions;
|
|
||||||
|
|
||||||
import com.nijiko.permissions.Group;
|
|
||||||
import com.nijiko.permissions.PermissionHandler;
|
|
||||||
import com.nijiko.permissions.User;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Comparator;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import org.anjocaido.groupmanager.GroupManager;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.plugin.Plugin;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Everything here maintains the model created by Nijikokun
|
|
||||||
*
|
|
||||||
* But implemented to use GroupManager system. Which provides instant changes,
|
|
||||||
* without file access.
|
|
||||||
*
|
|
||||||
* @author gabrielcouto
|
|
||||||
*/
|
|
||||||
public class NijikoPermissionsProxy extends PermissionHandler {
|
|
||||||
|
|
||||||
GroupManager plugin;
|
|
||||||
|
|
||||||
public NijikoPermissionsProxy(GroupManager plugin) {
|
|
||||||
super();
|
|
||||||
this.plugin = plugin;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void addGroupPermission(String world, String group, String node) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void removeGroupPermission(String world, String group, String node) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void addGroupInfo(String world, String group, String node, Object data) {
|
|
||||||
plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().addGroupInfo(group, node, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void removeGroupInfo(String world, String group, String node) {
|
|
||||||
plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().removeGroupInfo(group, node);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void addUserPermission(String world, String user, String node) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void removeUserPermission(String world, String user, String node) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void addUserInfo(String world, String user, String node, Object data) {
|
|
||||||
plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().addUserInfo(user, node, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void removeUserInfo(String world, String user, String node) {
|
|
||||||
plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().removeUserInfo(user, node);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public void removeUserInfo(String user, String node) {
|
|
||||||
plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().removeUserInfo(user, node);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public void addGroupPermission(String group, String node) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public void removeGroupPermission(String group, String node) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public void addGroupInfo(String group, String node, Object data) {
|
|
||||||
plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().addGroupInfo(group, node, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public void removeGroupInfo(String group, String node) {
|
|
||||||
plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().removeGroupInfo(group, node);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public void addUserPermission(String user, String node) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public void removeUserPermission(String user, String node) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public void addUserInfo(String user, String node, Object data) {
|
|
||||||
plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().addUserInfo(user, node, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setDefaultWorld(String world) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public void setDirectory(File directory) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean loadWorld(String world) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void forceLoadWorld(String world) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean checkWorld(String world) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void load() {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void reload() {
|
|
||||||
plugin.getWorldsHolder().reloadAll();
|
|
||||||
//throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean reload(String world) {
|
|
||||||
plugin.getWorldsHolder().reloadWorld(world);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean has(Player player, String permission) {
|
|
||||||
//throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
return permission(player, permission);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean permission(Player player, String permission) {
|
|
||||||
//throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
if (permission == null || permission.equals("")) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (player == null) {
|
|
||||||
GroupManager.logger.severe("A plugin is asking permission '" + permission + "' for a null player... Which plugin does that? Bastards!");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (player.getWorld() == null) {
|
|
||||||
GroupManager.logger.warning("The player " + player.getName() + " has a null world? Treating as default world!");
|
|
||||||
return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().has(player, permission);
|
|
||||||
}
|
|
||||||
return plugin.getWorldsHolder().getWorldData(player.getWorld().getName()).getPermissionsHandler().has(player, permission);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getGroupRawPrefix(String world, String group) {
|
|
||||||
return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getGroupPrefix(group);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getGroupRawSuffix(String world, String group) {
|
|
||||||
return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getGroupSuffix(group);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getUserPrefix(String world, String user) {
|
|
||||||
return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getUserPrefix(user);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getUserSuffix(String world, String user) {
|
|
||||||
return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getUserSuffix(user);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getGroup(String world, String user) {
|
|
||||||
return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getGroup(user);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getPrimaryGroup(String world, String user) {
|
|
||||||
return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getGroup(user);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canUserBuild(String world, String user) {
|
|
||||||
return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().canUserBuild(user);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public String getGroup(String name) {
|
|
||||||
return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().getGroup(name);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String[] getGroups(String world, String name) {
|
|
||||||
return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getGroups(name);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean inGroup(String world, String name, String group) {
|
|
||||||
return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().inGroup(name, group);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public boolean inGroup(String name, String group) {
|
|
||||||
return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().inGroup(name, group);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getGroupPrefix(String world, String group) {
|
|
||||||
return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getGroupPrefix(group);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public String getGroupPrefix(String group) {
|
|
||||||
return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().getGroupPrefix(group);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getGroupSuffix(String world, String group) {
|
|
||||||
return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getGroupSuffix(group);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public String getGroupSuffix(String group) {
|
|
||||||
return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().getGroupSuffix(group);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canGroupBuild(String world, String group) {
|
|
||||||
return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().canGroupBuild(group);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public boolean canGroupBuild(String group) {
|
|
||||||
return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().canGroupBuild(group);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getGroupPermissionString(String world, String group, String permission) {
|
|
||||||
return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getGroupPermissionString(group, permission);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public String getGroupPermissionString(String group, String permission) {
|
|
||||||
return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().getGroupPermissionString(group, permission);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getGroupPermissionInteger(String world, String group, String permission) {
|
|
||||||
return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getGroupPermissionInteger(group, permission);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public int getGroupPermissionInteger(String group, String permission) {
|
|
||||||
return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().getGroupPermissionInteger(group, permission);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean getGroupPermissionBoolean(String world, String group, String permission) {
|
|
||||||
return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getGroupPermissionBoolean(group, permission);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public boolean getGroupPermissionBoolean(String group, String permission) {
|
|
||||||
return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().getGroupPermissionBoolean(group, permission);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public double getGroupPermissionDouble(String world, String group, String permission) {
|
|
||||||
return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getGroupPermissionDouble(group, permission);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public double getGroupPermissionDouble(String group, String permission) {
|
|
||||||
return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().getGroupPermissionDouble(group, permission);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getUserPermissionString(String world, String name, String permission) {
|
|
||||||
return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getUserPermissionString(name, permission);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public String getUserPermissionString(String name, String permission) {
|
|
||||||
return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().getUserPermissionString(name, permission);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getUserPermissionInteger(String world, String name, String permission) {
|
|
||||||
return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getUserPermissionInteger(name, permission);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public int getUserPermissionInteger(String name, String permission) {
|
|
||||||
return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().getUserPermissionInteger(name, permission);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean getUserPermissionBoolean(String world, String name, String permission) {
|
|
||||||
return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getUserPermissionBoolean(name, permission);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public boolean getUserPermissionBoolean(String name, String permission) {
|
|
||||||
return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().getUserPermissionBoolean(name, permission);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public double getUserPermissionDouble(String world, String name, String permission) {
|
|
||||||
return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getUserPermissionDouble(name, permission);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public double getUserPermissionDouble(String name, String permission) {
|
|
||||||
return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().getUserPermissionDouble(name, permission);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getPermissionString(String world, String name, String permission) {
|
|
||||||
return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getPermissionString(name, permission);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public String getPermissionString(String name, String permission) {
|
|
||||||
return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().getPermissionString(name, permission);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getPermissionInteger(String world, String name, String permission) {
|
|
||||||
return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getPermissionInteger(name, permission);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public int getPermissionInteger(String name, String permission) {
|
|
||||||
return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().getPermissionInteger(name, permission);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean getPermissionBoolean(String world, String name, String permission) {
|
|
||||||
return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getPermissionBoolean(name, permission);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public boolean getPermissionBoolean(String name, String permission) {
|
|
||||||
return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().getPermissionBoolean(name, permission);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public double getPermissionDouble(String world, String name, String permission) {
|
|
||||||
return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getPermissionDouble(name, permission);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public double getPermissionDouble(String name, String permission) {
|
|
||||||
return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().getPermissionDouble(name, permission);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setGM(Plugin p) {
|
|
||||||
this.plugin = (GroupManager) p;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canGroupRawBuild(String world, String group) {
|
|
||||||
return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().canGroupBuild(group);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void closeAll() {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int compareWeights(String firstWorld, String first, String secondWorld, String second) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int compareWeights(String world, String first, String second) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Map<String, Set<String>> getAllGroups(String world, String name) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Group getDefaultGroup(String world) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Group getGroupObject(String world, String group) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getGroupProperName(String world, String group) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Boolean getInfoBoolean(String world, String entryName, String path,
|
|
||||||
boolean isGroup) {
|
|
||||||
return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getInfoBoolean(entryName, path, isGroup);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Boolean getInfoBoolean(String world, String entryName, String path,
|
|
||||||
boolean isGroup, Comparator<Boolean> comparator) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Double getInfoDouble(String world, String entryName, String path, boolean isGroup) {
|
|
||||||
return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getInfoDouble(entryName, path, isGroup);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Double getInfoDouble(String world, String entryName, String path,
|
|
||||||
boolean isGroup, Comparator<Double> comparator) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Integer getInfoInteger(String world, String entryName, String path,
|
|
||||||
boolean isGroup) {
|
|
||||||
return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getInfoInteger(entryName, path, isGroup);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Integer getInfoInteger(String world, String entryName, String path,
|
|
||||||
boolean isGroup, Comparator<Integer> comparator) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getInfoString(String world, String entryName, String path, boolean isGroup) {
|
|
||||||
return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getInfoString(entryName, path, isGroup);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getInfoString(String world, String entryName, String path,
|
|
||||||
boolean isGroup, Comparator<String> comparator) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Boolean getRawInfoBoolean(String world, String entryName, String path,
|
|
||||||
boolean isGroup) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Double getRawInfoDouble(String world, String entryName, String path,
|
|
||||||
boolean isGroup) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Integer getRawInfoInteger(String world, String entryName, String path,
|
|
||||||
boolean isGroup) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getRawInfoString(String world, String entryName, String path,
|
|
||||||
boolean isGroup) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Set<String> getTracks(String world) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public User getUserObject(String world, String name) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Collection<User> getUsers(String world) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Set<String> getWorlds() {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean has(String world, String playerName, String permission) {
|
|
||||||
if (permission == null || permission.isEmpty()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (playerName == null || playerName.isEmpty()) {
|
|
||||||
GroupManager.logger.severe("A plugin is asking permission '" + permission + "' for a null player... Which plugin does that? Bastards!");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (world == null) {
|
|
||||||
GroupManager.logger.warning("The player " + playerName + " has a null world? Treating as default world!");
|
|
||||||
return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().permission(playerName, permission);
|
|
||||||
}
|
|
||||||
return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().permission(playerName, permission);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean inGroup(String world, String user, String groupWorld, String group) {
|
|
||||||
return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().inGroup(user, group);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean inSingleGroup(String world, String user, String group) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean inSingleGroup(String world, String user, String groupWorld, String group) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean permission(String world, String name, String node) {
|
|
||||||
return has(world, name, node);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Group safeGetGroup(String world, String name) throws Exception {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public User safeGetUser(String world, String name) throws Exception {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void save(String world) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void saveAll() {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Collection<Group> getGroups(String world) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
//@Override
|
|
||||||
public Group getPrimaryGroupObject(String arg0, String arg1) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,4 +0,0 @@
|
||||||
name: Permissions
|
|
||||||
version: 3.1.6
|
|
||||||
main: com.nijikokun.bukkit.Permissions.Permissions
|
|
||||||
depend: [GroupManager]
|
|
Loading…
Reference in a new issue