mirror of
https://github.com/essentials/Essentials.git
synced 2025-09-25 05:41:36 +02:00
Moved signs code to a new module
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -37,4 +37,5 @@
|
|||||||
/WebPush/apikey.php
|
/WebPush/apikey.php
|
||||||
/WebPush/nbproject/private
|
/WebPush/nbproject/private
|
||||||
/.idea
|
/.idea
|
||||||
*.iml
|
*.iml
|
||||||
|
/EssentialsSigns/nbproject/private/
|
@@ -219,22 +219,6 @@ public class Essentials extends JavaPlugin implements IEssentials
|
|||||||
final EssentialsBlockListener blockListener = new EssentialsBlockListener(this);
|
final EssentialsBlockListener blockListener = new EssentialsBlockListener(this);
|
||||||
pm.registerEvent(Type.BLOCK_PLACE, blockListener, Priority.Lowest, this);
|
pm.registerEvent(Type.BLOCK_PLACE, blockListener, Priority.Lowest, this);
|
||||||
|
|
||||||
final SignBlockListener signBlockListener = new SignBlockListener(this);
|
|
||||||
pm.registerEvent(Type.SIGN_CHANGE, signBlockListener, Priority.Highest, this);
|
|
||||||
pm.registerEvent(Type.BLOCK_PLACE, signBlockListener, Priority.Low, this);
|
|
||||||
pm.registerEvent(Type.BLOCK_BREAK, signBlockListener, Priority.Highest, this);
|
|
||||||
pm.registerEvent(Type.BLOCK_IGNITE, signBlockListener, Priority.Low, this);
|
|
||||||
pm.registerEvent(Type.BLOCK_BURN, signBlockListener, Priority.Low, this);
|
|
||||||
pm.registerEvent(Type.BLOCK_PISTON_EXTEND, signBlockListener, Priority.Low, this);
|
|
||||||
pm.registerEvent(Type.BLOCK_PISTON_RETRACT, signBlockListener, Priority.Low, this);
|
|
||||||
|
|
||||||
final SignPlayerListener signPlayerListener = new SignPlayerListener(this);
|
|
||||||
pm.registerEvent(Type.PLAYER_INTERACT, signPlayerListener, Priority.Low, this);
|
|
||||||
|
|
||||||
final SignEntityListener signEntityListener = new SignEntityListener(this);
|
|
||||||
pm.registerEvent(Type.ENTITY_EXPLODE, signEntityListener, Priority.Low, this);
|
|
||||||
pm.registerEvent(Type.ENDERMAN_PICKUP, signEntityListener, Priority.Low, this);
|
|
||||||
|
|
||||||
final EssentialsEntityListener entityListener = new EssentialsEntityListener(this);
|
final EssentialsEntityListener entityListener = new EssentialsEntityListener(this);
|
||||||
pm.registerEvent(Type.ENTITY_DAMAGE, entityListener, Priority.Lowest, this);
|
pm.registerEvent(Type.ENTITY_DAMAGE, entityListener, Priority.Lowest, this);
|
||||||
pm.registerEvent(Type.ENTITY_COMBUST, entityListener, Priority.Lowest, this);
|
pm.registerEvent(Type.ENTITY_COMBUST, entityListener, Priority.Lowest, this);
|
||||||
@@ -313,11 +297,13 @@ public class Essentials extends JavaPlugin implements IEssentials
|
|||||||
return backup;
|
return backup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IUser getUser(final Player player)
|
public IUser getUser(final Player player)
|
||||||
{
|
{
|
||||||
return userMap.getUser(player);
|
return userMap.getUser(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IUser getUser(final String playerName)
|
public IUser getUser(final String playerName)
|
||||||
{
|
{
|
||||||
return userMap.getUser(playerName);
|
return userMap.getUser(playerName);
|
||||||
|
@@ -90,13 +90,13 @@ public interface IUser extends Player, IStorageObjectHolder<UserData>, IReload,
|
|||||||
|
|
||||||
boolean toggleMuted();
|
boolean toggleMuted();
|
||||||
|
|
||||||
public boolean toggleSocialSpy();
|
boolean toggleSocialSpy();
|
||||||
|
|
||||||
public void requestTeleport(IUser user, boolean b);
|
void requestTeleport(IUser user, boolean b);
|
||||||
|
|
||||||
public boolean isTeleportRequestHere();
|
boolean isTeleportRequestHere();
|
||||||
|
|
||||||
public IUser getTeleportRequester();
|
IUser getTeleportRequester();
|
||||||
|
|
||||||
public boolean toggleTeleportEnabled();
|
boolean toggleTeleportEnabled();
|
||||||
}
|
}
|
||||||
|
@@ -1,15 +1,12 @@
|
|||||||
package com.earth2me.essentials.user;
|
package com.earth2me.essentials.user;
|
||||||
|
|
||||||
import com.earth2me.essentials.Console;
|
import com.earth2me.essentials.Console;
|
||||||
import com.earth2me.essentials.api.IEssentials;
|
import static com.earth2me.essentials.I18n._;
|
||||||
import com.earth2me.essentials.api.IUser;
|
|
||||||
import com.earth2me.essentials.Teleport;
|
import com.earth2me.essentials.Teleport;
|
||||||
import com.earth2me.essentials.Util;
|
import com.earth2me.essentials.Util;
|
||||||
import com.earth2me.essentials.api.IGroups;
|
import com.earth2me.essentials.api.*;
|
||||||
import com.earth2me.essentials.api.ISettings;
|
|
||||||
import com.earth2me.essentials.commands.IEssentialsCommand;
|
import com.earth2me.essentials.commands.IEssentialsCommand;
|
||||||
import com.earth2me.essentials.register.payment.Method;
|
import com.earth2me.essentials.register.payment.Method;
|
||||||
import static com.earth2me.essentials.I18n._;
|
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.GregorianCalendar;
|
import java.util.GregorianCalendar;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -26,15 +23,13 @@ import org.bukkit.entity.Player;
|
|||||||
|
|
||||||
public class User extends UserBase implements IUser
|
public class User extends UserBase implements IUser
|
||||||
{
|
{
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
private CommandSender replyTo = null;
|
private CommandSender replyTo = null;
|
||||||
@Getter
|
@Getter
|
||||||
private transient User teleportRequester;
|
private transient IUser teleportRequester;
|
||||||
@Getter
|
@Getter
|
||||||
private transient boolean teleportRequestHere;
|
private transient boolean teleportRequestHere;
|
||||||
@Getter
|
@Getter
|
||||||
private transient final Teleport teleport;
|
private transient final ITeleport teleport;
|
||||||
@Getter
|
@Getter
|
||||||
private transient long teleportRequestTime;
|
private transient long teleportRequestTime;
|
||||||
@Getter
|
@Getter
|
||||||
@@ -612,4 +607,22 @@ public class User extends UserBase implements IUser
|
|||||||
{
|
{
|
||||||
return Util.stripColor(this.getDisplayName()).compareTo(Util.stripColor(t.getDisplayName()));
|
return Util.stripColor(this.getDisplayName()).compareTo(Util.stripColor(t.getDisplayName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void requestTeleport(IUser user, boolean b)
|
||||||
|
{
|
||||||
|
throw new UnsupportedOperationException("Not supported yet.");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setReplyTo(CommandSender user)
|
||||||
|
{
|
||||||
|
replyTo = user;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CommandSender getReplyTo()
|
||||||
|
{
|
||||||
|
return replyTo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -6,15 +6,12 @@ import com.earth2me.essentials.api.ISettings;
|
|||||||
import com.earth2me.essentials.craftbukkit.OfflineBedLocation;
|
import com.earth2me.essentials.craftbukkit.OfflineBedLocation;
|
||||||
import com.earth2me.essentials.storage.AsyncStorageObjectHolder;
|
import com.earth2me.essentials.storage.AsyncStorageObjectHolder;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.Map;
|
|
||||||
import lombok.Cleanup;
|
import lombok.Cleanup;
|
||||||
import lombok.Delegate;
|
import lombok.Delegate;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.OfflinePlayer;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
@@ -23,7 +20,6 @@ import org.bukkit.entity.LivingEntity;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.permissions.Permissible;
|
import org.bukkit.permissions.Permissible;
|
||||||
import org.bukkit.permissions.ServerOperator;
|
import org.bukkit.permissions.ServerOperator;
|
||||||
import org.bukkit.OfflinePlayer;
|
|
||||||
|
|
||||||
|
|
||||||
public abstract class UserBase extends AsyncStorageObjectHolder<UserData> implements Player, IOfflineUser
|
public abstract class UserBase extends AsyncStorageObjectHolder<UserData> implements Player, IOfflineUser
|
||||||
@@ -41,14 +37,14 @@ public abstract class UserBase extends AsyncStorageObjectHolder<UserData> implem
|
|||||||
{
|
{
|
||||||
super(ess, UserData.class);
|
super(ess, UserData.class);
|
||||||
this.base = base;
|
this.base = base;
|
||||||
reloadConfig();
|
onReload();
|
||||||
}
|
}
|
||||||
|
|
||||||
public UserBase(final OfflinePlayer offlinePlayer, final IEssentials ess)
|
public UserBase(final OfflinePlayer offlinePlayer, final IEssentials ess)
|
||||||
{
|
{
|
||||||
super(ess, UserData.class);
|
super(ess, UserData.class);
|
||||||
this.offlinePlayer = offlinePlayer;
|
this.offlinePlayer = offlinePlayer;
|
||||||
reloadConfig();
|
onReload();
|
||||||
}
|
}
|
||||||
|
|
||||||
public final Player getBase()
|
public final Player getBase()
|
||||||
@@ -117,7 +113,7 @@ public abstract class UserBase extends AsyncStorageObjectHolder<UserData> implem
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return OfflineBedLocation.getBedLocation(base.getName(), (com.earth2me.essentials.IEssentials)ess);
|
return OfflineBedLocation.getBedLocation(base.getName(), ess);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@ name: Essentials
|
|||||||
main: com.earth2me.essentials.Essentials
|
main: com.earth2me.essentials.Essentials
|
||||||
# Note to developers: This next line cannot change, or the automatic versioning system will break.
|
# Note to developers: This next line cannot change, or the automatic versioning system will break.
|
||||||
version: TeamCity
|
version: TeamCity
|
||||||
website: http://ci.earth2me.net/
|
website: http://tiny.cc/EssentialsWiki
|
||||||
description: Provides an essential, core set of commands for Bukkit.
|
description: Provides an essential, core set of commands for Bukkit.
|
||||||
authors: [Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeology, KHobbits]
|
authors: [Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeology, KHobbits]
|
||||||
commands:
|
commands:
|
||||||
|
@@ -3,7 +3,7 @@ name: EssentialsChat
|
|||||||
main: com.earth2me.essentials.chat.EssentialsChat
|
main: com.earth2me.essentials.chat.EssentialsChat
|
||||||
# Note to developers: This next line cannot change, or the automatic versioning system will break.
|
# Note to developers: This next line cannot change, or the automatic versioning system will break.
|
||||||
version: TeamCity
|
version: TeamCity
|
||||||
website: http://www.earth2me.net:8001/
|
website: http://tiny.cc/EssentialsWiki
|
||||||
description: Provides chat control features for Essentials. Requires Permissions.
|
description: Provides chat control features for Essentials. Requires Permissions.
|
||||||
authors: [Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeology, KHobbits, Okamosy]
|
authors: [Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeology, KHobbits, Okamosy]
|
||||||
depend: [Essentials]
|
depend: [Essentials]
|
||||||
|
@@ -3,7 +3,7 @@ name: EssentialsGeoIP
|
|||||||
main: com.earth2me.essentials.geoip.EssentialsGeoIP
|
main: com.earth2me.essentials.geoip.EssentialsGeoIP
|
||||||
# Note to developers: This next line cannot change, or the automatic versioning system will break.
|
# Note to developers: This next line cannot change, or the automatic versioning system will break.
|
||||||
version: TeamCity
|
version: TeamCity
|
||||||
website: http://www.earth2me.net:8001/
|
website: http://tiny.cc/EssentialsWiki
|
||||||
description: Shows the country or city of a user on login and /whois.
|
description: Shows the country or city of a user on login and /whois.
|
||||||
authors: [Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeology]
|
authors: [Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeology]
|
||||||
depend: [Essentials]
|
depend: [Essentials]
|
@@ -3,7 +3,7 @@ name: EssentialsProtect
|
|||||||
main: com.earth2me.essentials.protect.EssentialsProtect
|
main: com.earth2me.essentials.protect.EssentialsProtect
|
||||||
# Note to developers: This next line cannot change, or the automatic versioning system will break.
|
# Note to developers: This next line cannot change, or the automatic versioning system will break.
|
||||||
version: TeamCity
|
version: TeamCity
|
||||||
website: http://www.earth2me.net:8001/
|
website: http://tiny.cc/EssentialsWiki
|
||||||
description: Provides protection for various parts of the world.
|
description: Provides protection for various parts of the world.
|
||||||
authors: [Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeology, KHobbits]
|
authors: [Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeology, KHobbits]
|
||||||
softdepend: [Essentials]
|
softdepend: [Essentials]
|
74
EssentialsSigns/build.xml
Normal file
74
EssentialsSigns/build.xml
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
<?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="EssentialsSigns" default="default" basedir=".">
|
||||||
|
<description>Builds, tests, and runs the project EssentialsSigns.</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="EssentialsSigns-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>
|
3
EssentialsSigns/manifest.mf
Normal file
3
EssentialsSigns/manifest.mf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
Manifest-Version: 1.0
|
||||||
|
X-COMMENT: Main-Class will be added automatically by build
|
||||||
|
|
1083
EssentialsSigns/nbproject/build-impl.xml
Normal file
1083
EssentialsSigns/nbproject/build-impl.xml
Normal file
File diff suppressed because it is too large
Load Diff
8
EssentialsSigns/nbproject/genfiles.properties
Normal file
8
EssentialsSigns/nbproject/genfiles.properties
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
build.xml.data.CRC32=4bedf084
|
||||||
|
build.xml.script.CRC32=560095e7
|
||||||
|
build.xml.stylesheet.CRC32=28e38971@1.47.1.46
|
||||||
|
# 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=4bedf084
|
||||||
|
nbproject/build-impl.xml.script.CRC32=154412d6
|
||||||
|
nbproject/build-impl.xml.stylesheet.CRC32=c12040a1@1.47.1.46
|
125
EssentialsSigns/nbproject/project.properties
Normal file
125
EssentialsSigns/nbproject/project.properties
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
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=EssentialsSigns
|
||||||
|
application.vendor=
|
||||||
|
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.alignMultilineAnnotationArgs=true
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineArrayInit=true
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineAssignment=true
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineBinaryOp=true
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineCallArgs=true
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineDisjunctiveCatchTypes=true
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineFor=true
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineImplements=true
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineMethodParams=true
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineParenthesized=true
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineTernaryOp=true
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineThrows=true
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineTryResources=true
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.blankLinesAfterClassHeader=0
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.blankLinesBeforeClass=2
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.classDeclBracePlacement=NEW_LINE
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.expand-tabs=false
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.importGroupsOrder=*
|
||||||
|
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.indentCasesFromSwitch=false
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.methodDeclBracePlacement=NEW_LINE
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.otherBracePlacement=NEW_LINE
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeCatchOnNewLine=true
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeElseOnNewLine=true
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeFinallyOnNewLine=true
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeWhileOnNewLine=true
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.separateImportGroups=false
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceAfterTypeCast=false
|
||||||
|
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
|
||||||
|
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}/EssentialsSigns.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=false
|
||||||
|
jar.index=${jnlp.enabled}
|
||||||
|
javac.classpath=\
|
||||||
|
${file.reference.bukkit.jar}:\
|
||||||
|
${reference.Essentials.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=false
|
||||||
|
platform.active=default_platform
|
||||||
|
project.Essentials=../Essentials
|
||||||
|
reference.Essentials.jar=${project.Essentials}/dist/Essentials.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
|
28
EssentialsSigns/nbproject/project.xml
Normal file
28
EssentialsSigns/nbproject/project.xml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<?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>EssentialsSigns</name>
|
||||||
|
<source-roots>
|
||||||
|
<root id="src.dir"/>
|
||||||
|
</source-roots>
|
||||||
|
<test-roots>
|
||||||
|
<root id="test.src.dir"/>
|
||||||
|
</test-roots>
|
||||||
|
</data>
|
||||||
|
<libraries xmlns="http://www.netbeans.org/ns/ant-project-libraries/1">
|
||||||
|
<definitions>../lib/nblibraries.properties</definitions>
|
||||||
|
</libraries>
|
||||||
|
<references xmlns="http://www.netbeans.org/ns/ant-project-references/1">
|
||||||
|
<reference>
|
||||||
|
<foreign-project>Essentials</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>
|
@@ -0,0 +1,55 @@
|
|||||||
|
package com.earth2me.essentials.signs;
|
||||||
|
|
||||||
|
import static com.earth2me.essentials.I18n._;
|
||||||
|
import com.earth2me.essentials.api.IEssentials;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.event.Event;
|
||||||
|
import org.bukkit.plugin.PluginManager;
|
||||||
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
|
|
||||||
|
public class EssentialsSignsPlugin extends JavaPlugin
|
||||||
|
{
|
||||||
|
private static final transient Logger LOGGER = Bukkit.getLogger();
|
||||||
|
private transient IEssentials ess;
|
||||||
|
|
||||||
|
public void onEnable()
|
||||||
|
{
|
||||||
|
final PluginManager pluginManager = getServer().getPluginManager();
|
||||||
|
ess = (IEssentials)pluginManager.getPlugin("Essentials");
|
||||||
|
if (!this.getDescription().getVersion().equals(ess.getDescription().getVersion()))
|
||||||
|
{
|
||||||
|
LOGGER.log(Level.WARNING, _("versionMismatchAll"));
|
||||||
|
}
|
||||||
|
if (!ess.isEnabled())
|
||||||
|
{
|
||||||
|
this.setEnabled(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final SignBlockListener signBlockListener = new SignBlockListener(ess);
|
||||||
|
pluginManager.registerEvent(Event.Type.SIGN_CHANGE, signBlockListener, Event.Priority.Highest, this);
|
||||||
|
pluginManager.registerEvent(Event.Type.BLOCK_PLACE, signBlockListener, Event.Priority.Low, this);
|
||||||
|
pluginManager.registerEvent(Event.Type.BLOCK_BREAK, signBlockListener, Event.Priority.Highest, this);
|
||||||
|
pluginManager.registerEvent(Event.Type.BLOCK_IGNITE, signBlockListener, Event.Priority.Low, this);
|
||||||
|
pluginManager.registerEvent(Event.Type.BLOCK_BURN, signBlockListener, Event.Priority.Low, this);
|
||||||
|
pluginManager.registerEvent(Event.Type.BLOCK_PISTON_EXTEND, signBlockListener, Event.Priority.Low, this);
|
||||||
|
pluginManager.registerEvent(Event.Type.BLOCK_PISTON_RETRACT, signBlockListener, Event.Priority.Low, this);
|
||||||
|
|
||||||
|
final SignPlayerListener signPlayerListener = new SignPlayerListener(ess);
|
||||||
|
pluginManager.registerEvent(Event.Type.PLAYER_INTERACT, signPlayerListener, Event.Priority.Low, this);
|
||||||
|
|
||||||
|
final SignEntityListener signEntityListener = new SignEntityListener(ess);
|
||||||
|
pluginManager.registerEvent(Event.Type.ENTITY_EXPLODE, signEntityListener, Event.Priority.Low, this);
|
||||||
|
pluginManager.registerEvent(Event.Type.ENDERMAN_PICKUP, signEntityListener, Event.Priority.Low, this);
|
||||||
|
|
||||||
|
|
||||||
|
LOGGER.info(_("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), "essentials team"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onDisable()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
@@ -24,7 +24,7 @@ public class SignBlockListener extends BlockListener
|
|||||||
@Override
|
@Override
|
||||||
public void onBlockBreak(final BlockBreakEvent event)
|
public void onBlockBreak(final BlockBreakEvent event)
|
||||||
{
|
{
|
||||||
if (event.isCancelled() || ess.getSettings().areSignsDisabled())
|
if (event.isCancelled())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -76,7 +76,7 @@ public class SignBlockListener extends BlockListener
|
|||||||
@Override
|
@Override
|
||||||
public void onSignChange(final SignChangeEvent event)
|
public void onSignChange(final SignChangeEvent event)
|
||||||
{
|
{
|
||||||
if (event.isCancelled() || ess.getSettings().areSignsDisabled())
|
if (event.isCancelled())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -108,7 +108,7 @@ public class SignBlockListener extends BlockListener
|
|||||||
@Override
|
@Override
|
||||||
public void onBlockPlace(final BlockPlaceEvent event)
|
public void onBlockPlace(final BlockPlaceEvent event)
|
||||||
{
|
{
|
||||||
if (event.isCancelled() || ess.getSettings().areSignsDisabled())
|
if (event.isCancelled())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -142,7 +142,7 @@ public class SignBlockListener extends BlockListener
|
|||||||
@Override
|
@Override
|
||||||
public void onBlockBurn(final BlockBurnEvent event)
|
public void onBlockBurn(final BlockBurnEvent event)
|
||||||
{
|
{
|
||||||
if (event.isCancelled() || ess.getSettings().areSignsDisabled())
|
if (event.isCancelled())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -171,7 +171,7 @@ public class SignBlockListener extends BlockListener
|
|||||||
@Override
|
@Override
|
||||||
public void onBlockIgnite(final BlockIgniteEvent event)
|
public void onBlockIgnite(final BlockIgniteEvent event)
|
||||||
{
|
{
|
||||||
if (event.isCancelled() || ess.getSettings().areSignsDisabled())
|
if (event.isCancelled())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
@@ -45,7 +45,7 @@ public class SignEntityListener extends EntityListener
|
|||||||
@Override
|
@Override
|
||||||
public void onEndermanPickup(EndermanPickupEvent event)
|
public void onEndermanPickup(EndermanPickupEvent event)
|
||||||
{
|
{
|
||||||
if (event.isCancelled() || ess.getSettings().areSignsDisabled())
|
if (event.isCancelled())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
@@ -21,7 +21,7 @@ public class SignPlayerListener extends PlayerListener
|
|||||||
@Override
|
@Override
|
||||||
public void onPlayerInteract(PlayerInteractEvent event)
|
public void onPlayerInteract(PlayerInteractEvent event)
|
||||||
{
|
{
|
||||||
if (event.isCancelled() || ess.getSettings().areSignsDisabled())
|
if (event.isCancelled())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
9
EssentialsSigns/src/plugin.yml
Normal file
9
EssentialsSigns/src/plugin.yml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# This determines the command prefix when there are conflicts (/name:home, /name:help, etc.)
|
||||||
|
name: EssentialsSigns
|
||||||
|
main: com.earth2me.essentials.signs.EssentialsSignsPlugin
|
||||||
|
# Note to developers: This next line cannot change, or the automatic versioning system will break.
|
||||||
|
version: TeamCity
|
||||||
|
website: http://tiny.cc/EssentialsWiki
|
||||||
|
description: Provides signs, utilizing Essentials.
|
||||||
|
authors: [Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeology, KHobbits]
|
||||||
|
depend: [Essentials]
|
@@ -3,7 +3,7 @@ name: EssentialsSpawn
|
|||||||
main: com.earth2me.essentials.spawn.EssentialsSpawn
|
main: com.earth2me.essentials.spawn.EssentialsSpawn
|
||||||
# Note to developers: This next line cannot change, or the automatic versioning system will break.
|
# Note to developers: This next line cannot change, or the automatic versioning system will break.
|
||||||
version: TeamCity
|
version: TeamCity
|
||||||
website: http://www.earth2me.net:8001/
|
website: http://tiny.cc/EssentialsWiki
|
||||||
description: Provides spawn control commands, utilizing Essentials.
|
description: Provides spawn control commands, utilizing Essentials.
|
||||||
authors: [Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeology, KHobbits]
|
authors: [Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeology, KHobbits]
|
||||||
depend: [Essentials]
|
depend: [Essentials]
|
||||||
|
@@ -4,6 +4,7 @@ main: com.earth2me.essentials.update.EssentialsUpdate
|
|||||||
# Note to developers: This next line cannot change, or the automatic versioning system will break.
|
# Note to developers: This next line cannot change, or the automatic versioning system will break.
|
||||||
version: TeamCity
|
version: TeamCity
|
||||||
description: This plugin allows to install or update all Essentials plugins
|
description: This plugin allows to install or update all Essentials plugins
|
||||||
|
website: http://tiny.cc/EssentialsWiki
|
||||||
authors: [snowleo]
|
authors: [snowleo]
|
||||||
commands:
|
commands:
|
||||||
essentialsupdate:
|
essentialsupdate:
|
||||||
|
@@ -3,7 +3,7 @@ name: EssentialsXMPP
|
|||||||
main: com.earth2me.essentials.xmpp.EssentialsXMPP
|
main: com.earth2me.essentials.xmpp.EssentialsXMPP
|
||||||
# Note to developers: This next line cannot change, or the automatic versioning system will break.
|
# Note to developers: This next line cannot change, or the automatic versioning system will break.
|
||||||
version: TeamCity
|
version: TeamCity
|
||||||
website: http://www.earth2me.net:8001/
|
website: http://tiny.cc/EssentialsWiki
|
||||||
description: Provides xmpp communication.
|
description: Provides xmpp communication.
|
||||||
authors:
|
authors:
|
||||||
- snowleo
|
- snowleo
|
||||||
|
Reference in New Issue
Block a user