Mirror von
https://github.com/St3venAU/ArmorStandTools.git
synchronisiert 2024-12-27 12:00:07 +01:00
v3.2.0
Dieser Commit ist enthalten in:
Ursprung
076fdfd829
Commit
2bad136ebe
@ -9,8 +9,8 @@ I wanted to create an armor stand for each kit in my mini-game, and I quickly be
|
||||
|
||||
Compatibility
|
||||
-------------
|
||||
- Armor Stand Tools v3.0.2 - Spigot/CraftBukkit 1.13 only
|
||||
- Armor Stand Tools v2.4.3 - Spigot/CraftBukkit 1.8, 1.9, 1.10, 1.11, 1.12
|
||||
- Armor Stand Tools v3.2.0 - Spigot/CraftBukkit 1.13 only
|
||||
- Armor Stand Tools v2.4.3 - Spigot/CraftBukkit 1.8, 1.9, 1.10, 1.11, 1.12 (https://www.spigotmc.org/resources/armor-stand-tools.2237/download?version=175162)
|
||||
|
||||
Features
|
||||
--------
|
||||
@ -35,7 +35,6 @@ Assigning Commands
|
||||
- When a player with the astools.ascmd.execute permission right clicks on an armor stand, it's command is run.
|
||||
- If a player is crouching when they right click the armor stand, the command will not be run.
|
||||
- Warning: Make sure you are careful when assigning console commands. Any player with the astools.ascmd.execute permission will be able to execute the command.
|
||||
- Note: Commands may include a %player% placeholder, which will get replaced by the executing player's name at time of execution.
|
||||
|
||||
Commands
|
||||
--------
|
||||
|
@ -2,6 +2,7 @@ package com.gmail.St3venAU.plugins.ArmorStandTools;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.ArmorStand;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -160,8 +161,12 @@ class ArmorStandGUI implements Listener {
|
||||
Utils.actionBarMsg(p, Config.carrying);
|
||||
break;
|
||||
case SAVE:
|
||||
Main.nms.generateCmdBlock(p.getLocation(), as);
|
||||
Utils.actionBarMsg(p, Config.cbCreated);
|
||||
if(Config.requireCreative && p.getGameMode() != GameMode.CREATIVE) {
|
||||
p.sendMessage(ChatColor.RED + Config.creativeRequired);
|
||||
} else {
|
||||
Main.nms.generateCmdBlock(p.getLocation(), as);
|
||||
Utils.actionBarMsg(p, Config.cbCreated);
|
||||
}
|
||||
break;
|
||||
case SIZE:
|
||||
as.setSmall(!as.isSmall());
|
||||
|
@ -33,6 +33,7 @@ class Config {
|
||||
public static boolean allowMoveWorld = false;
|
||||
public static boolean deactivateOnWorldChange = true;
|
||||
public static boolean debug = false;
|
||||
public static boolean requireCreative = false;
|
||||
|
||||
public static String
|
||||
invReturned, asDropped, asVisible, isTrue, isFalse,
|
||||
@ -42,7 +43,7 @@ class Config {
|
||||
noRelPerm, noAirError, pleaseWait, appliedHead,
|
||||
invalidName, wgNoPerm, currently, headFailed,
|
||||
noCommandPerm, generalNoPerm, armorStand, none,
|
||||
guiInUse, noASNearBy, closestAS,
|
||||
guiInUse, noASNearBy, closestAS, creativeRequired,
|
||||
hasNoCmd, hasCmd, type, command, unassignedCmd,
|
||||
assignedCmdToAS, assignCmdError, ascmdHelp, viewCmd,
|
||||
removeCmd, assignConsole, assignPlayer, executeCmdError;
|
||||
@ -108,6 +109,7 @@ class Config {
|
||||
assignConsole = languageConfig.getString("assignConsole");
|
||||
assignPlayer = languageConfig.getString("assignPlayer");
|
||||
executeCmdError = languageConfig.getString("executeCmdError");
|
||||
creativeRequired = languageConfig.getString("creativeRequired");
|
||||
}
|
||||
|
||||
private static void reloadMainConfig() {
|
||||
@ -130,6 +132,7 @@ class Config {
|
||||
equipmentLock = config.getBoolean("equipmentLock");
|
||||
allowMoveWorld = config.getBoolean("allowMovingStandsBetweenWorlds");
|
||||
deactivateOnWorldChange = config.getBoolean("deactivateToolsOnWorldChange");
|
||||
requireCreative = config.getBoolean("requireCreativeForSaveAsCmdBlock");
|
||||
debug = config.getBoolean("debug", false);
|
||||
plugin.carryingArmorStand.clear();
|
||||
|
||||
|
@ -20,7 +20,7 @@ import java.util.logging.Level;
|
||||
|
||||
public class Main extends JavaPlugin {
|
||||
|
||||
private static final String LATEST_VERSION = "v1_13_R1";
|
||||
private static final String LATEST_VERSION = "v1_13_R2";
|
||||
|
||||
static NMS nms;
|
||||
|
||||
|
@ -54,7 +54,7 @@ public class MainListener implements Listener {
|
||||
|
||||
@EventHandler
|
||||
public void onPlayerInteractAtEntity(PlayerInteractAtEntityEvent event) {
|
||||
if (event.getRightClicked() instanceof ArmorStand) {
|
||||
if(!event.isCancelled() && event.getRightClicked() instanceof ArmorStand) {
|
||||
Player p = event.getPlayer();
|
||||
ArmorStand as = (ArmorStand) event.getRightClicked();
|
||||
if(ArmorStandGUI.isInUse(as)) {
|
||||
|
14
src/com/gmail/St3venAU/plugins/ArmorStandTools/NMS_v1_13_R2.java
Normale Datei
14
src/com/gmail/St3venAU/plugins/ArmorStandTools/NMS_v1_13_R2.java
Normale Datei
@ -0,0 +1,14 @@
|
||||
package com.gmail.St3venAU.plugins.ArmorStandTools;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
class NMS_v1_13_R2 extends NMS {
|
||||
|
||||
public NMS_v1_13_R2(Main plugin, String nmsVersion) {
|
||||
super(
|
||||
plugin,
|
||||
nmsVersion,
|
||||
"bH"
|
||||
);
|
||||
}
|
||||
|
||||
}
|
@ -4,7 +4,7 @@
|
||||
#
|
||||
# Main Config
|
||||
#
|
||||
# File generated by: v3.0.2
|
||||
# File generated by: v3.2.0
|
||||
# (If this is not the version you are running, consider deleting this
|
||||
# config to allow it to be re-created. There may be new config options)
|
||||
#
|
||||
@ -52,6 +52,7 @@
|
||||
integrateWithWorldGuard: true
|
||||
allowMovingStandsBetweenWorlds: false
|
||||
deactivateToolsOnWorldChange: true
|
||||
requireCreativeForSaveAsCmdBlock: false
|
||||
helmet: AIR 0
|
||||
chest: AIR 0
|
||||
pants: AIR 0
|
||||
|
@ -4,7 +4,7 @@
|
||||
#
|
||||
# Language Config
|
||||
#
|
||||
# File generated by: v3.0.2
|
||||
# File generated by: v3.2.0
|
||||
# (If this is not the version you are running, consider deleting this
|
||||
# config to allow it to be re-created. There may be new config options)
|
||||
#
|
||||
@ -79,6 +79,8 @@ removeCmd: 'Remove assigned command'
|
||||
assignConsole: 'Assign a command to be executed by the console'
|
||||
assignPlayer: 'Assign a command to be executed by the player'
|
||||
executeCmdError: 'An error occured executing the command assigned to this armor stand'
|
||||
# New since v3.2.0
|
||||
creativeRequired: 'Creative mode is required to save an armor stand as a command block'
|
||||
#
|
||||
#############################
|
||||
# Tool names & descriptions #
|
||||
|
@ -1,6 +1,6 @@
|
||||
main: com.gmail.St3venAU.plugins.ArmorStandTools.Main
|
||||
name: ArmorStandTools
|
||||
version: 3.0.2
|
||||
version: 3.2.0
|
||||
api-version: 1.13
|
||||
author: St3venAU
|
||||
description: Armor stand manipulation tools
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren