mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2025-03-13 07:09:50 +01:00
Updated readme and some info
This commit is contained in:
parent
e06b6afe25
commit
851ae010c6
@ -30,6 +30,9 @@ Advanced Portals <a href="https://travis-ci.org/sekwah41/Advanced-Portals/branch
|
|||||||
<h1>API</h1>
|
<h1>API</h1>
|
||||||
Still needs major work on the documentation however javadocs will be made available on my website on release.
|
Still needs major work on the documentation however javadocs will be made available on my website on release.
|
||||||
|
|
||||||
|
May be out of date but I will keep whatever javadocs there are updated every now and then here
|
||||||
|
http://www.sekwah.com/javadocs/advancedportals/
|
||||||
|
|
||||||
<h1>Usage Data</h1>
|
<h1>Usage Data</h1>
|
||||||
|
|
||||||
<img src="http://i.mcstats.org/AdvancedPortals/Global+Statistics.borderless.png" alt="Global Plugin Stats" title="Global Plugin Stats">
|
<img src="http://i.mcstats.org/AdvancedPortals/Global+Statistics.borderless.png" alt="Global Plugin Stats" title="Global Plugin Stats">
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
package com.sekwah.advancedportals.core;
|
package com.sekwah.advancedportals.core;
|
||||||
|
|
||||||
import com.sekwah.advancedportals.core.api.commands.SubCommand;
|
import com.sekwah.advancedportals.core.api.commands.SubCommand;
|
||||||
|
import com.sekwah.advancedportals.core.api.destination.Destination;
|
||||||
import com.sekwah.advancedportals.core.api.managers.DestinationManager;
|
import com.sekwah.advancedportals.core.api.managers.DestinationManager;
|
||||||
import com.sekwah.advancedportals.core.api.managers.PortalManager;
|
import com.sekwah.advancedportals.core.api.managers.PortalManager;
|
||||||
|
import com.sekwah.advancedportals.core.api.portal.AdvancedPortal;
|
||||||
import com.sekwah.advancedportals.core.api.registry.TagRegistry;
|
import com.sekwah.advancedportals.core.api.registry.TagRegistry;
|
||||||
import com.sekwah.advancedportals.core.api.registry.WarpEffectRegistry;
|
import com.sekwah.advancedportals.core.api.registry.WarpEffectRegistry;
|
||||||
import com.sekwah.advancedportals.core.commands.CommandWithSubCommands;
|
import com.sekwah.advancedportals.core.commands.CommandWithSubCommands;
|
||||||
@ -22,7 +24,8 @@ public class AdvancedPortalsCore {
|
|||||||
private final int mcMinorVer;
|
private final int mcMinorVer;
|
||||||
|
|
||||||
private WarpEffectRegistry warpEffectRegistry;
|
private WarpEffectRegistry warpEffectRegistry;
|
||||||
private TagRegistry tagRegistry;
|
private TagRegistry<AdvancedPortal> portalTagRegistry;
|
||||||
|
private TagRegistry<Destination> destiTagRegistry;
|
||||||
|
|
||||||
private CoreListeners coreListeners;
|
private CoreListeners coreListeners;
|
||||||
|
|
||||||
@ -38,10 +41,9 @@ public class AdvancedPortalsCore {
|
|||||||
public static final String lastTranslationUpdate = "1.0.0";
|
public static final String lastTranslationUpdate = "1.0.0";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @param dataStorage - The implementation of data storage for the specific platform
|
||||||
* @param dataStorage
|
* @param infoLogger - The implementation of the logger for the specific platform
|
||||||
* @param infoLogger
|
* @param commandRegister - Handles the command registry, different on each platform
|
||||||
* @param commandRegister
|
|
||||||
* @param mcVer Minecraft version e.g. 1.12.2
|
* @param mcVer Minecraft version e.g. 1.12.2
|
||||||
*/
|
*/
|
||||||
public AdvancedPortalsCore(DataStorage dataStorage, InfoLogger infoLogger, CommandRegister commandRegister, int[] mcVer) {
|
public AdvancedPortalsCore(DataStorage dataStorage, InfoLogger infoLogger, CommandRegister commandRegister, int[] mcVer) {
|
||||||
@ -52,7 +54,6 @@ public class AdvancedPortalsCore {
|
|||||||
this.mcMinorVer = this.checkMcVer(mcVer);
|
this.mcMinorVer = this.checkMcVer(mcVer);
|
||||||
|
|
||||||
this.onEnable();
|
this.onEnable();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private int checkMcVer(int[] mcVer) {
|
private int checkMcVer(int[] mcVer) {
|
||||||
@ -100,7 +101,8 @@ public class AdvancedPortalsCore {
|
|||||||
this.portalManager = new PortalManager(this);
|
this.portalManager = new PortalManager(this);
|
||||||
this.destiManager = new DestinationManager(this);
|
this.destiManager = new DestinationManager(this);
|
||||||
this.warpEffectRegistry = new WarpEffectRegistry();
|
this.warpEffectRegistry = new WarpEffectRegistry();
|
||||||
this.tagRegistry = new TagRegistry();
|
this.portalTagRegistry = new TagRegistry<>();
|
||||||
|
this.destiTagRegistry = new TagRegistry<>();
|
||||||
|
|
||||||
this.dataStorage.copyDefaultFile("lang/en_GB.lang", false);
|
this.dataStorage.copyDefaultFile("lang/en_GB.lang", false);
|
||||||
|
|
||||||
@ -187,7 +189,11 @@ public class AdvancedPortalsCore {
|
|||||||
return instance.destiManager;
|
return instance.destiManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static TagRegistry getTagRegistry() {
|
public static TagRegistry getPortalTagRegistry() {
|
||||||
return instance.tagRegistry;
|
return instance.portalTagRegistry;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static TagRegistry getDestinationTagRegistry() {
|
||||||
|
return instance.destiTagRegistry;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -148,8 +148,8 @@ public class PortalManager {
|
|||||||
portal.setArg(portalTag);
|
portal.setArg(portalTag);
|
||||||
}
|
}
|
||||||
for(DataTag portalTag : tags) {
|
for(DataTag portalTag : tags) {
|
||||||
TagHandler.Creation creation = AdvancedPortalsCore.getTagRegistry().getCreationHandler(portalTag.NAME);
|
TagHandler.Creation<AdvancedPortal> creation = AdvancedPortalsCore.getPortalTagRegistry().getCreationHandler(portalTag.NAME);
|
||||||
creation.portalCreated(portal, player, portalTag.VALUE);
|
creation.created(portal, player, portalTag.VALUE);
|
||||||
}
|
}
|
||||||
if(name == null || name.equals("")) {
|
if(name == null || name.equals("")) {
|
||||||
throw new PortalException("portal.error.noname");
|
throw new PortalException("portal.error.noname");
|
||||||
@ -167,14 +167,14 @@ public class PortalManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void removePlayerSelection(PlayerContainer player) throws PortalException {
|
public void removePlayerSelection(PlayerContainer player) throws PortalException {
|
||||||
String portal = this.selectedPortal.get(player.getUUID());
|
String portal = this.selectedPortal.get(player.getUUID().toString());
|
||||||
if(portal != null) {
|
if(portal != null) {
|
||||||
try {
|
try {
|
||||||
this.removePortal(player, portal);
|
this.removePortal(player, portal);
|
||||||
}
|
}
|
||||||
catch(PortalException e) {
|
catch(PortalException e) {
|
||||||
if(e.getMessage().equals("command.remove.noname")) {
|
if(e.getMessage().equals("command.remove.noname")) {
|
||||||
this.selectedPortal.remove(player.getUUID());
|
this.selectedPortal.remove(player.getUUID().toString());
|
||||||
throw new PortalException("command.remove.invalidselection");
|
throw new PortalException("command.remove.invalidselection");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -187,7 +187,7 @@ public class PortalManager {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param player null if a player didnt send it
|
* @param player null if a player didnt send it
|
||||||
* @param portalName
|
* @param portalName name of portal
|
||||||
* @throws PortalException
|
* @throws PortalException
|
||||||
*/
|
*/
|
||||||
public void removePortal(PlayerContainer player, String portalName) throws PortalException {
|
public void removePortal(PlayerContainer player, String portalName) throws PortalException {
|
||||||
@ -197,8 +197,8 @@ public class PortalManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for(DataTag portalTag : portal.getArgs()) {
|
for(DataTag portalTag : portal.getArgs()) {
|
||||||
TagHandler.Creation creation = AdvancedPortalsCore.getTagRegistry().getCreationHandler(portalTag.NAME);
|
TagHandler.Creation<AdvancedPortal> creation = AdvancedPortalsCore.getPortalTagRegistry().getCreationHandler(portalTag.NAME);
|
||||||
creation.portalCreated(portal, player, portalTag.VALUE);
|
creation.created(portal, player, portalTag.VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -64,20 +64,25 @@ public class AdvancedPortal {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean activatePortal(PlayerContainer player) {
|
public boolean activatePortal(PlayerContainer player) {
|
||||||
TagRegistry tagRegistry = AdvancedPortalsCore.getTagRegistry();
|
TagRegistry tagRegistry = AdvancedPortalsCore.getPortalTagRegistry();
|
||||||
ActivationData data = new ActivationData();
|
ActivationData data = new ActivationData();
|
||||||
DataTag[] portalTags = new DataTag[argsCol.size()];
|
DataTag[] portalTags = new DataTag[argsCol.size()];
|
||||||
String[] argNames = argsCol.toArray(new String[argsCol.size()]);
|
String[] argNames = argsCol.toArray(new String[argsCol.size()]);
|
||||||
for (int i = 0; i < argNames.length; i++) {
|
for (int i = 0; i < argNames.length; i++) {
|
||||||
portalTags[i] = new DataTag(argNames[i], this.getArg(argNames[i]));
|
portalTags[i] = new DataTag(argNames[i], this.getArg(argNames[i]));
|
||||||
}
|
}
|
||||||
for(DataTag portalTag : portalTags) {
|
try {
|
||||||
TagHandler.Activation activationHandler = tagRegistry.getActivationHandler(portalTag.NAME);
|
for(DataTag portalTag : portalTags) {
|
||||||
activationHandler.preActivated(this, player, data, this.getArg(portalTag.NAME));
|
TagHandler.Activation activationHandler = tagRegistry.getActivationHandler(portalTag.NAME);
|
||||||
|
activationHandler.preActivated(this, player, data, this.getArg(portalTag.NAME));
|
||||||
|
}
|
||||||
|
for(DataTag portalTag : portalTags) {
|
||||||
|
TagHandler.Activation activationHandler = tagRegistry.getActivationHandler(portalTag.NAME);
|
||||||
|
activationHandler.activated(this, player, data, this.getArg(portalTag.NAME));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for(DataTag portalTag : portalTags) {
|
catch(PortalException e) {
|
||||||
TagHandler.Activation activationHandler = tagRegistry.getActivationHandler(portalTag.NAME);
|
// TODO add portal error message
|
||||||
activationHandler.activated(this, player, data, this.getArg(portalTag.NAME));
|
|
||||||
}
|
}
|
||||||
for(DataTag portalTag : portalTags) {
|
for(DataTag portalTag : portalTags) {
|
||||||
TagHandler.Activation activationHandler = tagRegistry.getActivationHandler(portalTag.NAME);
|
TagHandler.Activation activationHandler = tagRegistry.getActivationHandler(portalTag.NAME);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.sekwah.advancedportals.core.api.portal;
|
package com.sekwah.advancedportals.core.api.portal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a message saying what went wrong with the portal tag.
|
* Returns a message saying what went wrong with the portal or the action was blocked for a reason.
|
||||||
*/
|
*/
|
||||||
public class PortalException extends Exception {
|
public class PortalException extends Exception {
|
||||||
public PortalException(String reason) {
|
public PortalException(String reason) {
|
||||||
|
@ -14,7 +14,7 @@ import java.util.Map;
|
|||||||
*
|
*
|
||||||
* @author sekwah41
|
* @author sekwah41
|
||||||
*/
|
*/
|
||||||
public class TagRegistry {
|
public class TagRegistry<T> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List of tag names which should be in order alphabetically
|
* List of tag names which should be in order alphabetically
|
||||||
@ -24,16 +24,16 @@ public class TagRegistry {
|
|||||||
* Description of tags for help commands
|
* Description of tags for help commands
|
||||||
*/
|
*/
|
||||||
private Map<String, String> tagDesc = new HashMap();
|
private Map<String, String> tagDesc = new HashMap();
|
||||||
private Map<String, TagHandler.Activation> activationHandlers = new HashMap();
|
private Map<String, TagHandler.Activation<T>> activationHandlers = new HashMap();
|
||||||
private Map<String, TagHandler.Creation> creationHandlers = new HashMap();
|
private Map<String, TagHandler.Creation<T>> creationHandlers = new HashMap();
|
||||||
private Map<String, TagHandler.TagStatus> statusHandlers = new HashMap();
|
private Map<String, TagHandler.TagStatus<T>> statusHandlers = new HashMap();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param arg
|
* @param arg
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public TagHandler.Activation getActivationHandler(String arg) {
|
public TagHandler.Activation<T> getActivationHandler(String arg) {
|
||||||
return this.activationHandlers.get(arg);
|
return this.activationHandlers.get(arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ public class TagRegistry {
|
|||||||
* @param arg
|
* @param arg
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public TagHandler.Creation getCreationHandler(String arg) {
|
public TagHandler.Creation<T> getCreationHandler(String arg) {
|
||||||
return this.creationHandlers.get(arg);
|
return this.creationHandlers.get(arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ public class TagRegistry {
|
|||||||
* @param arg
|
* @param arg
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public TagHandler.TagStatus getTagStatusHandler(String arg) {
|
public TagHandler.TagStatus<T> getTagStatusHandler(String arg) {
|
||||||
return this.statusHandlers.get(arg);
|
return this.statusHandlers.get(arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -123,9 +123,10 @@ public class TagRegistry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* File must extend
|
||||||
* @return if the tag has been registered or if it already exists.
|
* @return if the tag has been registered or if it already exists.
|
||||||
*/
|
*/
|
||||||
public boolean registerTag(String tag, TagHandler tagHandler) {
|
public boolean registerTag(String tag, Object tagHandler) {
|
||||||
|
|
||||||
if (tag == null) {
|
if (tag == null) {
|
||||||
AdvancedPortalsCore.getInfoLogger().logWarning("A tag cannot be null.");
|
AdvancedPortalsCore.getInfoLogger().logWarning("A tag cannot be null.");
|
||||||
@ -136,18 +137,14 @@ public class TagRegistry {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tagHandler != null && !(tagHandler instanceof TagHandler.Activation) && !(tagHandler instanceof TagHandler.TagStatus) &&
|
if (tagHandler instanceof TagHandler.Activation) {
|
||||||
!(tagHandler instanceof TagHandler.Creation)) {
|
this.activationHandlers.put(tag, (TagHandler.Activation<T>) tagHandler);
|
||||||
AdvancedPortalsCore.getInfoLogger().logWarning("Error with tag: " + tag + ". A tag handler must implement one of the handlers. Not just extend.");
|
}
|
||||||
if (tagHandler instanceof TagHandler.Activation) {
|
if (tagHandler instanceof TagHandler.TagStatus) {
|
||||||
this.activationHandlers.put(tag, (TagHandler.Activation) tagHandler);
|
this.statusHandlers.put(tag, (TagHandler.TagStatus<T>) tagHandler);
|
||||||
}
|
}
|
||||||
if (tagHandler instanceof TagHandler.TagStatus) {
|
if (tagHandler instanceof TagHandler.Creation) {
|
||||||
this.statusHandlers.put(tag, (TagHandler.TagStatus) tagHandler);
|
this.creationHandlers.put(tag, (TagHandler.Creation<T>) tagHandler);
|
||||||
}
|
|
||||||
if (tagHandler instanceof TagHandler.Creation) {
|
|
||||||
this.creationHandlers.put(tag, (TagHandler.Creation) tagHandler);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -5,50 +5,77 @@ import com.sekwah.advancedportals.core.api.portal.PortalException;
|
|||||||
import com.sekwah.advancedportals.coreconnector.container.PlayerContainer;
|
import com.sekwah.advancedportals.coreconnector.container.PlayerContainer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by on 30/07/2016.
|
* If a tag can be used for any of them then either make it cast the target or if it doesnt need a target
|
||||||
|
* then the exact same tag can be registered into both and ignore the portal info.
|
||||||
|
*
|
||||||
|
* Will probably make better documentation on how to do so or some tutorial videos though take a look at the source code
|
||||||
|
* on github for how the current tags are added.
|
||||||
|
*
|
||||||
|
* Also not sure if its good practice or not in java however these all extend TagHandler so they can be accepted in 1
|
||||||
|
* method nicer than if they didn't
|
||||||
*
|
*
|
||||||
* @author sekwah41
|
* @author sekwah41
|
||||||
*/
|
*/
|
||||||
public class TagHandler {
|
public interface TagHandler {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The events for portal creation and destroying
|
* The events for portal creation and destroying
|
||||||
*/
|
*/
|
||||||
public interface Creation<T> {
|
interface Creation<T> extends TagHandler {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Example if the player does not have access to use a tag on the portal.
|
* Example if the player does not have access to use the tag.
|
||||||
*
|
*
|
||||||
* @param player if null the portal has been created by the server or a plugin
|
* @param player if null then created by the server or a plugin
|
||||||
* @param argData
|
* @param argData
|
||||||
* @throws PortalException message given is the reason the portal cant be made
|
* @throws PortalException message given is the reason the portal (or destination) cannot be made
|
||||||
*/
|
*/
|
||||||
void portalCreated(T target, PlayerContainer player, String argData) throws PortalException;
|
void created(T target, PlayerContainer player, String argData) throws PortalException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Example if the player does not have access to remove the portal.
|
* Example if the player does not have access to remove the portal or destination.
|
||||||
*
|
*
|
||||||
* @param player if null the portal has been destroyed by the server or a plugin
|
* @param player if null then removed by the server or a plugin
|
||||||
* @param argData
|
* @param argData
|
||||||
* @throws PortalException message given is the reason the portal cant be removed
|
* @throws PortalException message given is the reason the portal cant be removed
|
||||||
*/
|
*/
|
||||||
void portalDestroyed(T target, PlayerContainer player, String argData) throws PortalException;
|
void destroyed(T target, PlayerContainer player, String argData) throws PortalException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface Activation<T> {
|
/**
|
||||||
|
* Order of activation
|
||||||
|
* Portal and Desti:
|
||||||
|
* preActivated
|
||||||
|
* activated
|
||||||
|
* postActivated
|
||||||
|
*
|
||||||
|
* Order of them combined:
|
||||||
|
* Portal.preActivated
|
||||||
|
* Portal.activated - when desti tag is hit (if listed) then next two actions are activated
|
||||||
|
* - Desti.preActivate
|
||||||
|
* - Desti.activate
|
||||||
|
* Portal.postActivate - when desti tag is hit (if listed) then the next action is activated
|
||||||
|
* - Desti.postActivate
|
||||||
|
*
|
||||||
|
* @param <T>
|
||||||
|
*/
|
||||||
|
interface Activation<T> extends TagHandler {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Activates before the main part of portal activation.
|
* Activates before the main part of activation. This should be for prechecks e.g. if the player has enough
|
||||||
|
* money before then taking the money in postActivated.
|
||||||
*
|
*
|
||||||
* @param player
|
* @param player
|
||||||
* @param activeData
|
* @param activeData
|
||||||
* @param argData
|
* @param argData
|
||||||
*/
|
*/
|
||||||
void preActivated(T target, PlayerContainer player, ActivationData activeData, String argData);
|
void preActivated(T target, PlayerContainer player, ActivationData activeData, String argData) throws PortalException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Activates after portal activation
|
* Activates after activation
|
||||||
|
*
|
||||||
|
* Any actions to do with player location should be done in activate
|
||||||
*
|
*
|
||||||
* @param player
|
* @param player
|
||||||
* @param activeData
|
* @param activeData
|
||||||
@ -57,17 +84,20 @@ public class TagHandler {
|
|||||||
void postActivated(T target, PlayerContainer player, ActivationData activeData, String argData);
|
void postActivated(T target, PlayerContainer player, ActivationData activeData, String argData);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Activates if the portal is allowed from pre
|
* Activates if the portal is allowed from preActivating. Should be used to set the intended warp location
|
||||||
|
*
|
||||||
|
* You should do some second checks if it can be dependent on the preActivate, the destination tags will also be
|
||||||
|
* triggered here if a desti is listed.
|
||||||
*
|
*
|
||||||
* @param player
|
* @param player
|
||||||
* @param activeData
|
* @param activeData
|
||||||
* @param argData
|
* @param argData
|
||||||
*/
|
*/
|
||||||
void activated(T target, PlayerContainer player, ActivationData activeData, String argData);
|
void activated(T target, PlayerContainer player, ActivationData activeData, String argData) throws PortalException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface TagStatus<T> {
|
interface TagStatus<T> extends TagHandler {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If the user has access to add the tag (this does not include being added on creation)
|
* If the user has access to add the tag (this does not include being added on creation)
|
||||||
@ -76,7 +106,7 @@ public class TagHandler {
|
|||||||
* @param argData
|
* @param argData
|
||||||
* @return if the tag will be added.
|
* @return if the tag will be added.
|
||||||
*/
|
*/
|
||||||
boolean tagAdded(T target, PlayerContainer player, String argData);
|
boolean tagAdded(T target, PlayerContainer player, String argData) throws PortalException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If the user has access to remove the tag (this does not include being added on destruction)
|
* If the user has access to remove the tag (this does not include being added on destruction)
|
||||||
@ -85,7 +115,7 @@ public class TagHandler {
|
|||||||
* @param argData
|
* @param argData
|
||||||
* @return if the tag will be removed.
|
* @return if the tag will be removed.
|
||||||
*/
|
*/
|
||||||
boolean tagRemoved(T target, PlayerContainer player, String argData);
|
boolean tagRemoved(T target, PlayerContainer player, String argData) throws PortalException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ public class CreateSubCommand implements SubCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String getTag(String arg) {
|
private String getTag(String arg) {
|
||||||
ArrayList<String> tags = AdvancedPortalsCore.getTagRegistry().getTags();
|
ArrayList<String> tags = AdvancedPortalsCore.getPortalTagRegistry().getTags();
|
||||||
for(String tag : tags) {
|
for(String tag : tags) {
|
||||||
if(arg.startsWith(tag + ":")) {
|
if(arg.startsWith(tag + ":")) {
|
||||||
return tag;
|
return tag;
|
||||||
|
Loading…
Reference in New Issue
Block a user