mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-22 17:17:37 +00:00
big think, it should be public
This commit is contained in:
parent
65b8188b37
commit
41aff575d0
@ -139,9 +139,9 @@ public class WorldListener extends PlexListener
|
|||||||
/**
|
/**
|
||||||
* Check if a Player has the ability to modify the world they are in
|
* Check if a Player has the ability to modify the world they are in
|
||||||
*
|
*
|
||||||
* @param player
|
* @param player The player who wants to modify the world
|
||||||
* @param showMessage
|
* @param showMessage Whether the message from the config.yml should be shown
|
||||||
* @return
|
* @return Returns true if the person has the ability to modify the world
|
||||||
*/
|
*/
|
||||||
private boolean canModifyWorld(Player player, boolean showMessage)
|
private boolean canModifyWorld(Player player, boolean showMessage)
|
||||||
{
|
{
|
||||||
@ -188,9 +188,8 @@ public class WorldListener extends PlexListener
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if a Player has the ability to enter the requested world
|
* Check if a Player has the ability to enter the requested world
|
||||||
*
|
* @param player The player who wants to enter the world
|
||||||
* @param player
|
* @return Returns true if the person has the ability to enter the world
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
private boolean canEnterWorld(Player player)
|
private boolean canEnterWorld(Player player)
|
||||||
{
|
{
|
||||||
|
@ -48,22 +48,38 @@ public abstract class PlexModule
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Registers a PlexListener within a module
|
||||||
|
* @param listener The PlexListener to be registered
|
||||||
|
*/
|
||||||
public void registerListener(PlexListener listener)
|
public void registerListener(PlexListener listener)
|
||||||
{
|
{
|
||||||
listeners.add(listener);
|
listeners.add(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unregisters a PlexListener. Handled by Plex automatically
|
||||||
|
* @param listener The PlexListener to be registered
|
||||||
|
*/
|
||||||
public void unregisterListener(PlexListener listener)
|
public void unregisterListener(PlexListener listener)
|
||||||
{
|
{
|
||||||
listeners.remove(listener);
|
listeners.remove(listener);
|
||||||
HandlerList.unregisterAll(listener);
|
HandlerList.unregisterAll(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Registers a PlexCommand within a module
|
||||||
|
* @param command The PlexCommand to be registered
|
||||||
|
*/
|
||||||
public void registerCommand(PlexCommand command)
|
public void registerCommand(PlexCommand command)
|
||||||
{
|
{
|
||||||
commands.add(command);
|
commands.add(command);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unregisters a PlexCommand. Handled by Plex automatically
|
||||||
|
* @param command The PlexCommand to be registered
|
||||||
|
*/
|
||||||
public void unregisterCommand(PlexCommand command)
|
public void unregisterCommand(PlexCommand command)
|
||||||
{
|
{
|
||||||
commands.remove(command);
|
commands.remove(command);
|
||||||
@ -79,7 +95,7 @@ public abstract class PlexModule
|
|||||||
* @param message The key value for the message
|
* @param message The key value for the message
|
||||||
* @param initValue The message itself
|
* @param initValue The message itself
|
||||||
*/
|
*/
|
||||||
private void addDefaultMessage(String message, Object initValue)
|
public void addDefaultMessage(String message, Object initValue)
|
||||||
{
|
{
|
||||||
if (plugin.messages.getString(message) == null)
|
if (plugin.messages.getString(message) == null)
|
||||||
{
|
{
|
||||||
@ -95,7 +111,7 @@ public abstract class PlexModule
|
|||||||
* @param initValue The message itself
|
* @param initValue The message itself
|
||||||
* @param comments The comments to be placed above the message
|
* @param comments The comments to be placed above the message
|
||||||
*/
|
*/
|
||||||
private void addDefaultMessage(String message, Object initValue, String... comments)
|
public void addDefaultMessage(String message, Object initValue, String... comments)
|
||||||
{
|
{
|
||||||
if (plugin.messages.getString(message) == null)
|
if (plugin.messages.getString(message) == null)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user