mirror of
https://github.com/NLthijs48/AreaShop.git
synced 2024-11-23 10:45:53 +01:00
Adds a tag for the player name that clicks the sign
Can be used in the commands that get executed when someone clicks an AreaShop sign. Tag is %clicker%
This commit is contained in:
parent
4125364a96
commit
1fd24d864d
@ -96,6 +96,7 @@ limitGroups:
|
|||||||
## %depth% The depth of the region (amount of blocks on the z-axis)
|
## %depth% The depth of the region (amount of blocks on the z-axis)
|
||||||
## %height% The height of the region (amount of blocks on the y-axis)
|
## %height% The height of the region (amount of blocks on the y-axis)
|
||||||
## %timeleft% The time left on the rent (uses the unit of time that fits best, minutes used from 121 seconds till 120 minutes)
|
## %timeleft% The time left on the rent (uses the unit of time that fits best, minutes used from 121 seconds till 120 minutes)
|
||||||
|
## %clicker% The name of the player that clicked the sign (only to be used in the signProfiles section)
|
||||||
|
|
||||||
## Below are profiles for the signs, you can assign profiles to regions
|
## Below are profiles for the signs, you can assign profiles to regions
|
||||||
## by setting 'general.signProfile' in default.yml, groups or individual regions
|
## by setting 'general.signProfile' in default.yml, groups or individual regions
|
||||||
|
@ -71,6 +71,7 @@ public final class AreaShop extends JavaPlugin {
|
|||||||
public static final String tagHeight = "%height%"; // y-axis
|
public static final String tagHeight = "%height%"; // y-axis
|
||||||
public static final String tagDepth = "%depth%"; // z-axis
|
public static final String tagDepth = "%depth%"; // z-axis
|
||||||
public static final String tagTimeLeft = "%timeleft%";
|
public static final String tagTimeLeft = "%timeleft%";
|
||||||
|
public static final String tagClicker = "%clicker%";
|
||||||
|
|
||||||
public static AreaShop getInstance() {
|
public static AreaShop getInstance() {
|
||||||
return AreaShop.instance;
|
return AreaShop.instance;
|
||||||
|
@ -1855,6 +1855,9 @@ public abstract class GeneralRegion {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
command = applyAllReplacements(command);
|
command = applyAllReplacements(command);
|
||||||
|
if(sender instanceof Player) {
|
||||||
|
command = command.replace(AreaShop.tagClicker, sender.getName());
|
||||||
|
}
|
||||||
|
|
||||||
boolean result = false;
|
boolean result = false;
|
||||||
String error = null;
|
String error = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user