├── .gitignore ├── .travis.yml ├── LICENSE.md ├── README.md ├── WGBridge5x ├── build.gradle └── src │ └── main │ └── java │ └── me │ └── fromgate │ └── reactions │ └── module │ └── wgbridge │ └── WGBridge5x.java ├── build.gradle ├── circle.yml ├── core ├── build.gradle └── src │ └── main │ ├── java │ ├── me │ │ └── fromgate │ │ │ └── reactions │ │ │ ├── ReActions.java │ │ │ ├── actions │ │ │ ├── Action.java │ │ │ ├── ActionBack.java │ │ │ ├── ActionBlockFill.java │ │ │ ├── ActionBlockSet.java │ │ │ ├── ActionBroadcast.java │ │ │ ├── ActionCancelEvent.java │ │ │ ├── ActionChatMessage.java │ │ │ ├── ActionClearRadius.java │ │ │ ├── ActionClearRegion.java │ │ │ ├── ActionCommand.java │ │ │ ├── ActionDamage.java │ │ │ ├── ActionDelay.java │ │ │ ├── ActionDelayed.java │ │ │ ├── ActionEffect.java │ │ │ ├── ActionExecStop.java │ │ │ ├── ActionExecUnstop.java │ │ │ ├── ActionExecute.java │ │ │ ├── ActionFactionsPowerAdd.java │ │ │ ├── ActionFile.java │ │ │ ├── ActionFly.java │ │ │ ├── ActionFlySpeed.java │ │ │ ├── ActionGlide.java │ │ │ ├── ActionGroupAdd.java │ │ │ ├── ActionGroupRemove.java │ │ │ ├── ActionHeal.java │ │ │ ├── ActionIfElse.java │ │ │ ├── ActionItems.java │ │ │ ├── ActionLog.java │ │ │ ├── ActionMenuItem.java │ │ │ ├── ActionMessage.java │ │ │ ├── ActionMobSpawn.java │ │ │ ├── ActionMoneyGive.java │ │ │ ├── ActionMoneyPay.java │ │ │ ├── ActionPlayerId.java │ │ │ ├── ActionPlayerPotion.java │ │ │ ├── ActionPlayerPotionRemove.java │ │ │ ├── ActionPowerSet.java │ │ │ ├── ActionRacesAndClasses.java │ │ │ ├── ActionRegex.java │ │ │ ├── ActionShoot.java │ │ │ ├── ActionSignSet.java │ │ │ ├── ActionSound.java │ │ │ ├── ActionSql.java │ │ │ ├── ActionTimer.java │ │ │ ├── ActionTownKick.java │ │ │ ├── ActionTownSet.java │ │ │ ├── ActionTp.java │ │ │ ├── ActionVar.java │ │ │ ├── ActionVelocity.java │ │ │ ├── ActionVelocityJump.java │ │ │ ├── ActionWait.java │ │ │ ├── ActionWalkSpeed.java │ │ │ ├── ActionWeSuperPickaxe.java │ │ │ ├── ActionWeToolControl.java │ │ │ └── Actions.java │ │ │ ├── activators │ │ │ ├── Activator.java │ │ │ ├── ActivatorType.java │ │ │ ├── Activators.java │ │ │ ├── BlockBreakActivator.java │ │ │ ├── BlockClickActivator.java │ │ │ ├── ButtonActivator.java │ │ │ ├── CommandActivator.java │ │ │ ├── DamageActivator.java │ │ │ ├── DamageByBlockActivator.java │ │ │ ├── DamageByMobActivator.java │ │ │ ├── DoorActivator.java │ │ │ ├── DropActivator.java │ │ │ ├── EntityClickActivator.java │ │ │ ├── ExecActivator.java │ │ │ ├── FactionActivator.java │ │ │ ├── FactionCreateActivator.java │ │ │ ├── FactionDisbandActivator.java │ │ │ ├── FactionRelationActivator.java │ │ │ ├── FlightActivator.java │ │ │ ├── GameModeActivator.java │ │ │ ├── GodActivator.java │ │ │ ├── InventoryClickActivator.java │ │ │ ├── ItemClickActivator.java │ │ │ ├── ItemConsumeActivator.java │ │ │ ├── ItemHeldActivator.java │ │ │ ├── ItemHoldActivator.java │ │ │ ├── ItemWearActivator.java │ │ │ ├── JoinActivator.java │ │ │ ├── LeverActivator.java │ │ │ ├── MessageActivator.java │ │ │ ├── MobClickActivator.java │ │ │ ├── MobDamageActivator.java │ │ │ ├── MobKillActivator.java │ │ │ ├── PickupItemActivator.java │ │ │ ├── PlateActivator.java │ │ │ ├── PlayerDeathActivator.java │ │ │ ├── PlayerRespawnActivator.java │ │ │ ├── PvpKillActivator.java │ │ │ ├── QuitActivator.java │ │ │ ├── RegionActivator.java │ │ │ ├── RegionEnterActivator.java │ │ │ ├── RegionLeaveActivator.java │ │ │ ├── SignActivator.java │ │ │ ├── SneakActivator.java │ │ │ ├── VariableActivator.java │ │ │ ├── WeChangeActivator.java │ │ │ └── WeSelectionRegionActivator.java │ │ │ ├── commands │ │ │ ├── Cmd.java │ │ │ ├── CmdAdd.java │ │ │ ├── CmdCheck.java │ │ │ ├── CmdClear.java │ │ │ ├── CmdCopy.java │ │ │ ├── CmdDebug.java │ │ │ ├── CmdDefine.java │ │ │ ├── CmdExec.java │ │ │ ├── CmdGroup.java │ │ │ ├── CmdHelp.java │ │ │ ├── CmdInfo.java │ │ │ ├── CmdList.java │ │ │ ├── CmdReload.java │ │ │ ├── CmdRemove.java │ │ │ ├── CmdRun.java │ │ │ ├── CmdSelect.java │ │ │ ├── CmdSet.java │ │ │ └── Commander.java │ │ │ ├── event │ │ │ ├── BlockClickEvent.java │ │ │ ├── ButtonEvent.java │ │ │ ├── CommandEvent.java │ │ │ ├── DamageByBlockEvent.java │ │ │ ├── DamageByMobEvent.java │ │ │ ├── DamageEvent.java │ │ │ ├── DoorEvent.java │ │ │ ├── DropEvent.java │ │ │ ├── EntityClickEvent.java │ │ │ ├── EventManager.java │ │ │ ├── ExecEvent.java │ │ │ ├── FactionCreateEvent.java │ │ │ ├── FactionDisbandEvent.java │ │ │ ├── FactionEvent.java │ │ │ ├── FactionRelationEvent.java │ │ │ ├── FlightEvent.java │ │ │ ├── GameModeEvent.java │ │ │ ├── GodEvent.java │ │ │ ├── ItemClickEvent.java │ │ │ ├── ItemConsumeEvent.java │ │ │ ├── ItemHeldEvent.java │ │ │ ├── ItemHoldEvent.java │ │ │ ├── ItemWearEvent.java │ │ │ ├── JoinEvent.java │ │ │ ├── LeverEvent.java │ │ │ ├── MessageEvent.java │ │ │ ├── MobClickEvent.java │ │ │ ├── MobDamageEvent.java │ │ │ ├── MobKillEvent.java │ │ │ ├── PickupItemEvent.java │ │ │ ├── PlateEvent.java │ │ │ ├── PlayerBlockBreakEvent.java │ │ │ ├── PlayerInventoryClickEvent.java │ │ │ ├── PlayerRespawnedEvent.java │ │ │ ├── PlayerWasKilledEvent.java │ │ │ ├── PvpKillEvent.java │ │ │ ├── QuitEvent.java │ │ │ ├── RAEvent.java │ │ │ ├── RegionEnterEvent.java │ │ │ ├── RegionEvent.java │ │ │ ├── RegionLeaveEvent.java │ │ │ ├── SignEvent.java │ │ │ ├── SneakEvent.java │ │ │ ├── VariableEvent.java │ │ │ ├── WeChangeEvent.java │ │ │ └── WeSelectionRegionEvent.java │ │ │ ├── externals │ │ │ ├── Externals.java │ │ │ ├── FactionListener.java │ │ │ ├── LogHandler.java │ │ │ ├── RaCraftConomy.java │ │ │ ├── RaEconomics.java │ │ │ ├── RaEffects.java │ │ │ ├── RaFactions.java │ │ │ ├── RaPlaceholderAPI.java │ │ │ ├── RaProtocolLib.java │ │ │ ├── RaRacesAndClasses.java │ │ │ ├── RaTowny.java │ │ │ ├── RaVault.java │ │ │ ├── RaWorldGuard.java │ │ │ ├── RegionCache.java │ │ │ └── worldedit │ │ │ │ ├── RaWorldEdit.java │ │ │ │ ├── WeDelegateExtent.java │ │ │ │ ├── WeListener.java │ │ │ │ └── WeSelection.java │ │ │ ├── flags │ │ │ ├── Flag.java │ │ │ ├── FlagBiome.java │ │ │ ├── FlagBlock.java │ │ │ ├── FlagChance.java │ │ │ ├── FlagCompare.java │ │ │ ├── FlagDelay.java │ │ │ ├── FlagDirection.java │ │ │ ├── FlagExecStop.java │ │ │ ├── FlagFlagSet.java │ │ │ ├── FlagFlySpeed.java │ │ │ ├── FlagFoodlevel.java │ │ │ ├── FlagGameMode.java │ │ │ ├── FlagGreaterLower.java │ │ │ ├── FlagGroup.java │ │ │ ├── FlagHealth.java │ │ │ ├── FlagItem.java │ │ │ ├── FlagLevel.java │ │ │ ├── FlagLightLevel.java │ │ │ ├── FlagMoney.java │ │ │ ├── FlagOnline.java │ │ │ ├── FlagPerm.java │ │ │ ├── FlagPowered.java │ │ │ ├── FlagPvp.java │ │ │ ├── FlagRacesAndClasses.java │ │ │ ├── FlagRegion.java │ │ │ ├── FlagSQL.java │ │ │ ├── FlagState.java │ │ │ ├── FlagTime.java │ │ │ ├── FlagTimerActive.java │ │ │ ├── FlagTown.java │ │ │ ├── FlagVar.java │ │ │ ├── FlagWalkBlock.java │ │ │ ├── FlagWalkSpeed.java │ │ │ ├── FlagWeather.java │ │ │ ├── FlagWorld.java │ │ │ ├── FlagXP.java │ │ │ ├── Flags.java │ │ │ ├── factions │ │ │ │ ├── FlagAtFactionZoneRel.java │ │ │ │ ├── FlagFaction.java │ │ │ │ ├── FlagIsFactionRelPlayerAround.java │ │ │ │ └── FlagPlayersInRel.java │ │ │ └── worldedit │ │ │ │ ├── FlagRegionInRadius.java │ │ │ │ ├── FlagSelectionBlocks.java │ │ │ │ ├── FlagSuperPickAxe.java │ │ │ │ └── FlagToolControl.java │ │ │ ├── menu │ │ │ ├── InventoryMenu.java │ │ │ └── VirtualInventory.java │ │ │ ├── module │ │ │ └── wgbridge │ │ │ │ ├── WGBridge.java │ │ │ │ └── WGBridge6x.java │ │ │ ├── placeholders │ │ │ ├── Placeholder.java │ │ │ ├── PlaceholderCalc.java │ │ │ ├── PlaceholderDamage.java │ │ │ ├── PlaceholderDefine.java │ │ │ ├── PlaceholderMoney.java │ │ │ ├── PlaceholderPlayer.java │ │ │ ├── PlaceholderRandom.java │ │ │ ├── PlaceholderTime.java │ │ │ └── Placeholders.java │ │ │ ├── sql │ │ │ └── SQLManager.java │ │ │ ├── timer │ │ │ ├── Time.java │ │ │ ├── Timer.java │ │ │ └── Timers.java │ │ │ └── util │ │ │ ├── ActVal.java │ │ │ ├── BukkitCompatibilityFix.java │ │ │ ├── Cfg.java │ │ │ ├── Delayer.java │ │ │ ├── FakeCmd.java │ │ │ ├── FlagVal.java │ │ │ ├── GodMode.java │ │ │ ├── Locator.java │ │ │ ├── MathEval.java │ │ │ ├── Param.java │ │ │ ├── PlayerRespawner.java │ │ │ ├── ProfEl.java │ │ │ ├── Profiler.java │ │ │ ├── PushBack.java │ │ │ ├── RaDebug.java │ │ │ ├── Selector.java │ │ │ ├── Shoot.java │ │ │ ├── Teleporter.java │ │ │ ├── TempOp.java │ │ │ ├── TpLoc.java │ │ │ ├── UpdateChecker.java │ │ │ ├── Util.java │ │ │ ├── Variables.java │ │ │ ├── VelocityUtil.java │ │ │ ├── item │ │ │ ├── ItemUtil.java │ │ │ ├── VirtualItem.java │ │ │ └── VirtualItem18.java │ │ │ ├── listeners │ │ │ ├── ArmorStandListener.java │ │ │ ├── MoveListener.java │ │ │ └── RaListener.java │ │ │ ├── message │ │ │ ├── BukkitMessenger.java │ │ │ ├── M.java │ │ │ └── Messenger.java │ │ │ ├── mob │ │ │ ├── MobHorse.java │ │ │ ├── MobSpawn.java │ │ │ └── MobWither.java │ │ │ ├── playerselector │ │ │ ├── FactionsPlayers.java │ │ │ ├── GroupPlayers.java │ │ │ ├── LocSelector.java │ │ │ ├── PermPlayers.java │ │ │ ├── PlayerSelector.java │ │ │ ├── PlayerSelectors.java │ │ │ ├── Players.java │ │ │ ├── RegionsPlayers.java │ │ │ ├── SelectorDefine.java │ │ │ └── WorldsPlayers.java │ │ │ └── waiter │ │ │ ├── ActionsWaiter.java │ │ │ └── Task.java │ └── org │ │ └── quartz │ │ └── CronExpression.java │ └── resources │ ├── language │ └── russian.lng │ └── plugin.yml ├── gradle.properties └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | /target 3 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | jdk: 3 | - oraclejdk8 4 | install: 5 | - gradle clean 6 | - gradle build -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ReActions 2 | 3 | ReActions is a plugin for craftbukkit (spigot) server. It brings to Minecraft server a custom event processing system. 4 | 5 | ## Download 6 | 7 | [**Plugin Page on BukkitDev - Download release here!**](https://dev.bukkit.org/bukkit-plugins/reactions/) 8 | 9 | [**Страница плагина на RuBukkit**](http://rubukkit.org/threads/mech-fun-reactions-chto-togda-inache-bukkitdev.41857/) 10 | 11 | [**Latest Dev Build** ![Snapshot](https://circleci.com/gh/Redolith/ReActions.svg?style=shield&circle-token=2bb628276a494b5ac51ec0a0ae4deda896b6f3e3)](https://circleci.com/gh/Redolith/ReActions) 12 | 13 | ## Documentation 14 | 15 | [**Documentation Site**](http://reactions.fromgate.me) | [**Сайт документации**](http://reactions.fromgate.ru) | 16 | [Documentation (Github Wiki)](https://github.com/Redolith/ReActions/wiki) 17 | 18 | 19 | 20 | ## Developed using Intellij IDEA by Jetbrains 21 | [![Intellij IDEA](http://reactions.fromgate.ru/images/intellij-logo-300.png)](https://www.jetbrains.com/) -------------------------------------------------------------------------------- /WGBridge5x/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java' 2 | 3 | compileJava.options.encoding = 'UTF-8' 4 | compileJava.sourceCompatibility = 1.8 5 | compileJava.targetCompatibility = 1.8 6 | 7 | repositories { 8 | mavenCentral() 9 | maven { url "http://repo.maven.apache.org/maven2" } 10 | maven { url "https://hub.spigotmc.org/nexus/content/repositories/snapshots/" } 11 | maven { url "http://maven.sk89q.com/repo/" } 12 | maven { url "http://repo.nukkit.ru" } 13 | maven { url "http://nexus.hc.to/content/repositories/pub_releases" } 14 | maven { url "http://repo.dmulloy2.net/nexus/repository/public/" } 15 | // ProtoclLib repo broken, try to look here too 16 | maven { url "http://mvn.yawk.at/" } 17 | maven { url "http://cnaude.org/repo/" } 18 | maven { url "http://repo.bstats.org/content/repositories/releases/" } 19 | maven { url "http://repo.extendedclip.com/content/repositories/placeholderapi/" } 20 | } 21 | 22 | dependencies { 23 | compile group: 'com.sk89q', name: 'worldedit', version: '5.6.4-SNAPSHOT' 24 | compile group: 'com.sk89q', name: 'worldguard', version: '5.8.1-SNAPSHOT' 25 | compile project(':core') 26 | } 27 | -------------------------------------------------------------------------------- /circle.yml: -------------------------------------------------------------------------------- 1 | checkout: 2 | post: 3 | - gradle clean 4 | - gradle shadowJar 5 | - cp -R ./build/libs/ReActions-1.0-SNAPSHOT.jar $CIRCLE_ARTIFACTS 6 | 7 | machine: 8 | java: 9 | version: openjdk8 -------------------------------------------------------------------------------- /core/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java' 2 | 3 | compileJava.options.encoding = 'UTF-8' 4 | compileJava.sourceCompatibility = 1.8 5 | compileJava.targetCompatibility = 1.8 6 | 7 | repositories { 8 | mavenCentral() 9 | maven { url "http://repo.maven.apache.org/maven2" } 10 | maven { url "https://hub.spigotmc.org/nexus/content/repositories/snapshots/" } 11 | maven { url "http://maven.sk89q.com/repo/" } 12 | maven { url "http://repo.nukkit.ru" } 13 | maven { url "http://nexus.hc.to/content/repositories/pub_releases" } 14 | maven { url "http://repo.dmulloy2.net/nexus/repository/public/" } 15 | // ProtoclLib repo broken, try to look here too 16 | maven { url "http://mvn.yawk.at/" } 17 | maven { url "http://cnaude.org/repo/" } 18 | maven { url "http://repo.bstats.org/content/repositories/releases/" } 19 | maven { url "http://repo.extendedclip.com/content/repositories/placeholderapi/"} 20 | } 21 | 22 | dependencies { 23 | compile group: 'com.comphenix.protocol', name: 'ProtocolLib-API', version:'4.2.1' 24 | compile group: 'com.massivecraft.massivecore', name: 'massivecore', version:'2.9.9' 25 | compile group: 'com.massivecraft.factions', name: 'factions', version:'2.9.0' 26 | compile group: 'me.fromgate.playeffect', name: 'PlayEffect', version:'1.0-SNAPSHOT' 27 | compile group: 'de.tobiyas.racesandclasses', name: 'RacesAndClasses', version:'1.2.1' 28 | compile group: 'com.palmergames.bukkit.towny', name: 'Towny', version:'0.9.1' 29 | compile group: 'com.greatmancode', name: 'craftconomy3', version:'3.3', ext:'jar' 30 | compile group: 'org.bukkit', name: 'bukkit', version:'1.12.2-R0.1-SNAPSHOT' 31 | compile group: 'com.sk89q', name: 'worldedit', version:'6.0.0-SNAPSHOT' 32 | compile group: 'com.sk89q', name: 'worldguard', version:'6.1.1-SNAPSHOT' 33 | compile group: 'net.milkbowl.vault', name: 'Vault', version:'1.6.6' 34 | compile group: 'me.clip', name: 'placeholderapi', version: '2.8.2' 35 | compile group: 'org.bstats', name: 'bstats-bukkit-lite', version: '1.2' 36 | } -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/actions/ActionBack.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ReActions, Minecraft bukkit plugin 3 | * (c)2012-2017, fromgate, fromgate@gmail.com 4 | * http://dev.bukkit.org/server-mods/reactions/ 5 | * 6 | * This file is part of ReActions. 7 | * 8 | * ReActions is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * ReActions is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with ReActions. If not, see . 20 | * 21 | */ 22 | 23 | package me.fromgate.reactions.actions; 24 | 25 | import me.fromgate.reactions.util.Param; 26 | import me.fromgate.reactions.util.PushBack; 27 | import org.bukkit.entity.Player; 28 | 29 | public class ActionBack extends Action { 30 | 31 | @Override 32 | public boolean execute(Player p, Param params) { 33 | return PushBack.teleportToPrev(p, params.getParam("param-line", 1)); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/actions/ActionBroadcast.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ReActions, Minecraft bukkit plugin 3 | * (c)2012-2017, fromgate, fromgate@gmail.com 4 | * http://dev.bukkit.org/server-mods/reactions/ 5 | * 6 | * This file is part of ReActions. 7 | * 8 | * ReActions is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * ReActions is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with ReActions. If not, see . 20 | * 21 | */ 22 | 23 | package me.fromgate.reactions.actions; 24 | 25 | import me.fromgate.reactions.util.Param; 26 | import me.fromgate.reactions.util.message.M; 27 | import org.bukkit.entity.Player; 28 | 29 | public class ActionBroadcast extends Action { 30 | 31 | @Override 32 | public boolean execute(Player p, Param params) { 33 | for (Player pl : plg().getServer().getOnlinePlayers()) { 34 | M.printMessage(pl, params.getParam("param-line")); 35 | } 36 | return true; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/actions/ActionCancelEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ReActions, Minecraft bukkit plugin 3 | * (c)2012-2017, fromgate, fromgate@gmail.com 4 | * http://dev.bukkit.org/server-mods/reactions/ 5 | * 6 | * This file is part of ReActions. 7 | * 8 | * ReActions is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * ReActions is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with ReActions. If not, see . 20 | * 21 | */ 22 | 23 | package me.fromgate.reactions.actions; 24 | 25 | import me.fromgate.reactions.util.Param; 26 | import org.bukkit.entity.Player; 27 | 28 | public class ActionCancelEvent extends Action { 29 | 30 | @Override 31 | public boolean execute(Player p, Param params) { 32 | return params.getParam("param-line", false); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/actions/ActionChatMessage.java: -------------------------------------------------------------------------------- 1 | package me.fromgate.reactions.actions; 2 | 3 | import me.fromgate.reactions.util.Param; 4 | import org.bukkit.entity.Player; 5 | 6 | /** 7 | * Created by MaxDikiy on 2017-10-04. 8 | */ 9 | public class ActionChatMessage extends Action { 10 | @Override 11 | public boolean execute(Player p, Param params) { 12 | if (p != null) { 13 | String msg = params.getParam("param-line"); 14 | msg = msg.replaceFirst("^[\\s\\/]+", ""); 15 | p.chat(msg); 16 | } 17 | return true; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/actions/ActionClearRadius.java: -------------------------------------------------------------------------------- 1 | package me.fromgate.reactions.actions; 2 | 3 | import me.fromgate.reactions.util.Param; 4 | import me.fromgate.reactions.util.Util; 5 | import org.bukkit.Location; 6 | import org.bukkit.entity.Entity; 7 | import org.bukkit.entity.EntityType; 8 | import org.bukkit.entity.LivingEntity; 9 | import org.bukkit.entity.Player; 10 | 11 | import java.util.List; 12 | 13 | /** 14 | * Created by MaxDikiy on 20/10/2017. 15 | */ 16 | public class ActionClearRadius extends Action { 17 | @Override 18 | public boolean execute(Player p, Param params) { 19 | int radius = params.getParam("radius", 0); 20 | String type = params.getParam("type", "all"); 21 | if (radius == 0) return false; 22 | List locs = Util.getMinMaxRadiusLocations(p, radius); 23 | if (locs.size() != 2) return false; 24 | List en = Util.getEntities(locs.get(0), locs.get(1)); 25 | int count = 0; 26 | for (Entity e : en) { 27 | if (e.getType() == EntityType.PLAYER) continue; 28 | if (isEntityIsTypeOf(e, type)) { 29 | e.remove(); 30 | count++; 31 | } 32 | } 33 | setMessageParam(Integer.toString(count)); 34 | return true; 35 | } 36 | 37 | private boolean isEntityIsTypeOf(Entity e, String type) { 38 | if (e == null) return false; 39 | if (type.isEmpty()) return true; 40 | if (type.equalsIgnoreCase("all")) return true; 41 | if (e instanceof LivingEntity) { 42 | if (type.equalsIgnoreCase("mob") || type.equalsIgnoreCase("mobs")) return true; 43 | } else { 44 | if (type.equalsIgnoreCase("item") || type.equalsIgnoreCase("items")) return true; 45 | } 46 | return (Util.isWordInList(e.getType().name().toLowerCase(), type.toLowerCase())); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/actions/ActionDamage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ReActions, Minecraft bukkit plugin 3 | * (c)2012-2017, fromgate, fromgate@gmail.com 4 | * http://dev.bukkit.org/server-mods/reactions/ 5 | * 6 | * This file is part of ReActions. 7 | * 8 | * ReActions is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * ReActions is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with ReActions. If not, see . 20 | * 21 | */ 22 | 23 | package me.fromgate.reactions.actions; 24 | 25 | import me.fromgate.reactions.util.BukkitCompatibilityFix; 26 | import me.fromgate.reactions.util.Param; 27 | import org.bukkit.Bukkit; 28 | import org.bukkit.EntityEffect; 29 | import org.bukkit.entity.Player; 30 | 31 | public class ActionDamage extends Action { 32 | 33 | @SuppressWarnings("deprecation") 34 | @Override 35 | public boolean execute(Player p, Param params) { 36 | Player player = p; 37 | double damage = 0; 38 | if (params.hasAnyParam("damage", "player")) { 39 | String playerName = params.getParam("player", p != null ? p.getName() : ""); 40 | player = playerName.isEmpty() ? null : Bukkit.getPlayerExact(playerName); 41 | damage = params.getParam("damage", 0); 42 | } else params.getParam("param-line", 0); 43 | return damagePlayer(player, damage); 44 | } 45 | 46 | 47 | public boolean damagePlayer(Player player, double damage) { 48 | if (player == null || player.isDead() || !player.isOnline()) return false; 49 | if (damage > 0) BukkitCompatibilityFix.damageEntity(player, damage); 50 | else player.playEffect(EntityEffect.HURT); 51 | setMessageParam(Double.toString(damage)); 52 | return true; 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/actions/ActionDelayed.java: -------------------------------------------------------------------------------- 1 | package me.fromgate.reactions.actions; 2 | 3 | import me.fromgate.reactions.util.ActVal; 4 | import me.fromgate.reactions.util.Param; 5 | import me.fromgate.reactions.util.Util; 6 | import me.fromgate.reactions.util.message.M; 7 | import me.fromgate.reactions.util.waiter.ActionsWaiter; 8 | import org.bukkit.entity.Player; 9 | 10 | public class ActionDelayed extends Action { 11 | 12 | @Override 13 | public boolean execute(Player p, Param params) { 14 | long delay = Util.parseTime(params.getParam("time", "0")); 15 | if (delay == 0) return false; 16 | 17 | String actionSource = params.getParam("action", ""); 18 | if (actionSource.isEmpty()) return false; 19 | String actionStr; 20 | String paramStr = ""; 21 | if (!actionSource.contains(" ")) actionStr = actionSource; 22 | else { 23 | actionStr = actionSource.substring(0, actionSource.indexOf(" ")); 24 | paramStr = actionSource.substring(actionSource.indexOf(" ") + 1); 25 | } 26 | 27 | if (!Actions.isValid(actionStr)) { 28 | M.logOnce(actionSource, "Failed to execute delayed action: " + actionSource); 29 | return false; 30 | } 31 | 32 | ActVal av = new ActVal(actionStr, paramStr); 33 | ActionsWaiter.executeDelayed(p, av, this.isAction(), delay); 34 | return false; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/actions/ActionEffect.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ReActions, Minecraft bukkit plugin 3 | * (c)2012-2017, fromgate, fromgate@gmail.com 4 | * http://dev.bukkit.org/server-mods/reactions/ 5 | * 6 | * This file is part of ReActions. 7 | * 8 | * ReActions is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * ReActions is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with ReActions. If not, see . 20 | * 21 | */ 22 | 23 | package me.fromgate.reactions.actions; 24 | 25 | import me.fromgate.reactions.externals.RaEffects; 26 | import me.fromgate.reactions.util.Param; 27 | import org.bukkit.entity.Player; 28 | 29 | public class ActionEffect extends Action { 30 | 31 | @Override 32 | public boolean execute(Player p, Param params) { 33 | RaEffects.playEffect(p, params); 34 | return true; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/actions/ActionExecStop.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ReActions, Minecraft bukkit plugin 3 | * (c)2012-2017, fromgate, fromgate@gmail.com 4 | * http://dev.bukkit.org/server-mods/reactions/ 5 | * 6 | * This file is part of ReActions. 7 | * 8 | * ReActions is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * ReActions is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with ReActions. If not, see . 20 | * 21 | */ 22 | 23 | package me.fromgate.reactions.actions; 24 | 25 | import me.fromgate.reactions.activators.Activators; 26 | import me.fromgate.reactions.util.Param; 27 | import org.bukkit.entity.Player; 28 | 29 | public class ActionExecStop extends Action { 30 | 31 | @Override 32 | public boolean execute(Player p, Param params) { 33 | String player = params.getParam("player", (p == null ? "" : p.getName())); 34 | if (player.isEmpty()) return false; 35 | String activator = params.getParam("activator", ""); 36 | if (activator.isEmpty()) return false; 37 | Activators.stopExec(player, activator); 38 | setMessageParam(activator); 39 | return true; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/actions/ActionExecUnstop.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ReActions, Minecraft bukkit plugin 3 | * (c)2012-2017, fromgate, fromgate@gmail.com 4 | * http://dev.bukkit.org/server-mods/reactions/ 5 | * 6 | * This file is part of ReActions. 7 | * 8 | * ReActions is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * ReActions is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with ReActions. If not, see . 20 | * 21 | */ 22 | 23 | package me.fromgate.reactions.actions; 24 | 25 | import me.fromgate.reactions.activators.Activators; 26 | import me.fromgate.reactions.util.Param; 27 | import org.bukkit.entity.Player; 28 | 29 | public class ActionExecUnstop extends Action { 30 | 31 | @Override 32 | public boolean execute(Player p, Param params) { 33 | String player = params.getParam("player", (p == null ? "" : p.getName())); 34 | if (player.isEmpty()) return false; 35 | String activator = params.getParam("activator", ""); 36 | if (activator.isEmpty()) return false; 37 | setMessageParam(activator); 38 | return Activators.isStopped(player, activator, true); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/actions/ActionExecute.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ReActions, Minecraft bukkit plugin 3 | * (c)2012-2017, fromgate, fromgate@gmail.com 4 | * http://dev.bukkit.org/server-mods/reactions/ 5 | * 6 | * This file is part of ReActions. 7 | * 8 | * ReActions is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * ReActions is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with ReActions. If not, see . 20 | * 21 | */ 22 | 23 | package me.fromgate.reactions.actions; 24 | 25 | import me.fromgate.reactions.event.EventManager; 26 | import me.fromgate.reactions.util.Param; 27 | import me.fromgate.reactions.util.Variables; 28 | import org.bukkit.entity.Player; 29 | 30 | public class ActionExecute extends Action { 31 | 32 | @Override 33 | public boolean execute(Player player, Param params) { 34 | return execActivator(player, params); 35 | } 36 | 37 | public boolean execActivator(Player player, Param params) { 38 | String id = params.getParam("activator", ""); 39 | if (id.isEmpty()) return false; 40 | setMessageParam(id); 41 | return EventManager.raiseExecEvent(player, params, Variables.getTempVars()); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/actions/ActionFactionsPowerAdd.java: -------------------------------------------------------------------------------- 1 | package me.fromgate.reactions.actions; 2 | 3 | import me.fromgate.reactions.externals.Externals; 4 | import me.fromgate.reactions.externals.RaFactions; 5 | import me.fromgate.reactions.util.Param; 6 | import org.bukkit.entity.Player; 7 | 8 | public class ActionFactionsPowerAdd extends Action { 9 | 10 | @Override 11 | public boolean execute(Player player, Param params) { 12 | if (!Externals.isConnectedFactions()) return false; 13 | RaFactions.addPower(player, params.getParam("power", 0.0)); 14 | return true; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/actions/ActionFlySpeed.java: -------------------------------------------------------------------------------- 1 | package me.fromgate.reactions.actions; 2 | 3 | import me.fromgate.reactions.util.Param; 4 | import org.bukkit.Bukkit; 5 | import org.bukkit.entity.Player; 6 | 7 | /** 8 | * Created by MaxDikiy on 2017-05-16. 9 | */ 10 | public class ActionFlySpeed extends Action { 11 | @Override 12 | public boolean execute(Player p, Param params) { 13 | Player player = p; 14 | double speed; 15 | if (params.hasAnyParam("speed", "player")) { 16 | String playerName = params.getParam("player", p != null ? p.getName() : ""); 17 | //noinspection deprecation 18 | player = playerName.isEmpty() ? null : Bukkit.getPlayerExact(playerName); 19 | speed = params.getParam("speed", 0); 20 | } else speed = params.getParam("param-line", 0); 21 | return flySpeedPlayer(player, speed / 10); 22 | } 23 | 24 | public boolean flySpeedPlayer(Player player, double speed) { 25 | if (player == null || player.isDead() || !player.isOnline()) return false; 26 | if (speed > 1) speed = 1; 27 | if (speed < 0) speed = 0; 28 | player.setFlySpeed((float) speed); 29 | return true; 30 | } 31 | } -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/actions/ActionGlide.java: -------------------------------------------------------------------------------- 1 | package me.fromgate.reactions.actions; 2 | 3 | import me.fromgate.reactions.util.BukkitCompatibilityFix; 4 | import me.fromgate.reactions.util.Param; 5 | import org.bukkit.Bukkit; 6 | import org.bukkit.entity.Player; 7 | 8 | /** 9 | * Created by MaxDikiy on 5/8/2017. 10 | */ 11 | public class ActionGlide extends Action { 12 | @Override 13 | public boolean execute(Player p, Param params) { 14 | Player player; 15 | String playerName = params.getParam("player", p != null ? p.getName() : ""); 16 | //noinspection deprecation 17 | player = playerName.isEmpty() ? null : Bukkit.getPlayerExact(playerName); 18 | Boolean isGlide = params.getParam("glide", true); 19 | return glidePlayer(player, isGlide); 20 | } 21 | 22 | public boolean glidePlayer(Player player, Boolean isGlide) { 23 | if (player == null || player.isDead() || !player.isOnline()) return false; 24 | BukkitCompatibilityFix.setGliding(player, isGlide); 25 | return true; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/actions/ActionGroupAdd.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ReActions, Minecraft bukkit plugin 3 | * (c)2012-2017, fromgate, fromgate@gmail.com 4 | * http://dev.bukkit.org/server-mods/reactions/ 5 | * 6 | * This file is part of ReActions. 7 | * 8 | * ReActions is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * ReActions is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with ReActions. If not, see . 20 | * 21 | */ 22 | 23 | package me.fromgate.reactions.actions; 24 | 25 | import me.fromgate.reactions.externals.RaVault; 26 | import me.fromgate.reactions.util.Param; 27 | import org.bukkit.entity.Player; 28 | 29 | public class ActionGroupAdd extends Action { 30 | 31 | @Override 32 | public boolean execute(Player p, Param params) { 33 | return (RaVault.playerAddGroup(p, params.getParam("param-line", ""))); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/actions/ActionGroupRemove.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ReActions, Minecraft bukkit plugin 3 | * (c)2012-2017, fromgate, fromgate@gmail.com 4 | * http://dev.bukkit.org/server-mods/reactions/ 5 | * 6 | * This file is part of ReActions. 7 | * 8 | * ReActions is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * ReActions is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with ReActions. If not, see . 20 | * 21 | */ 22 | 23 | package me.fromgate.reactions.actions; 24 | 25 | import me.fromgate.reactions.externals.RaVault; 26 | import me.fromgate.reactions.util.Param; 27 | import org.bukkit.entity.Player; 28 | 29 | public class ActionGroupRemove extends Action { 30 | 31 | @Override 32 | public boolean execute(Player p, Param params) { 33 | String param = params.getParam("param-line", ""); 34 | if (RaVault.playerInGroup(p, param)) { 35 | if (!RaVault.playerRemoveGroup(p, param)) return false; 36 | } 37 | return true; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/actions/ActionMenuItem.java: -------------------------------------------------------------------------------- 1 | package me.fromgate.reactions.actions; 2 | 3 | import me.fromgate.reactions.menu.InventoryMenu; 4 | import me.fromgate.reactions.util.Param; 5 | import me.fromgate.reactions.util.Variables; 6 | import org.bukkit.entity.Player; 7 | 8 | public class ActionMenuItem extends Action { 9 | 10 | @Override 11 | public boolean execute(Player player, Param params) { 12 | return InventoryMenu.createAndOpenInventory(player, params, Variables.getTempVars()); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/actions/ActionMobSpawn.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ReActions, Minecraft bukkit plugin 3 | * (c)2012-2017, fromgate, fromgate@gmail.com 4 | * http://dev.bukkit.org/server-mods/reactions/ 5 | * 6 | * This file is part of ReActions. 7 | * 8 | * ReActions is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * ReActions is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with ReActions. If not, see . 20 | * 21 | */ 22 | 23 | package me.fromgate.reactions.actions; 24 | 25 | import me.fromgate.reactions.util.Param; 26 | import me.fromgate.reactions.util.mob.MobSpawn; 27 | import org.bukkit.entity.Player; 28 | 29 | public class ActionMobSpawn extends Action { 30 | 31 | @Override 32 | public boolean execute(Player p, Param params) { 33 | MobSpawn.mobSpawn(p, params); 34 | return true; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/actions/ActionRacesAndClasses.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ReActions, Minecraft bukkit plugin 3 | * (c)2012-2017, fromgate, fromgate@gmail.com 4 | * http://dev.bukkit.org/server-mods/reactions/ 5 | * 6 | * This file is part of ReActions. 7 | * 8 | * ReActions is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * ReActions is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with ReActions. If not, see . 20 | * 21 | */ 22 | 23 | package me.fromgate.reactions.actions; 24 | 25 | import me.fromgate.reactions.externals.RaRacesAndClasses; 26 | import me.fromgate.reactions.util.Param; 27 | import org.bukkit.entity.Player; 28 | 29 | public class ActionRacesAndClasses extends Action { 30 | private boolean setRace; 31 | 32 | public ActionRacesAndClasses(boolean setRace) { 33 | this.setRace = setRace; 34 | } 35 | 36 | @Override 37 | public boolean execute(Player p, Param params) { 38 | if (!RaRacesAndClasses.isEnabled()) return false; 39 | return this.setRace ? RaRacesAndClasses.setRace(p, params.getParam("race", "")) : RaRacesAndClasses.setClass(p, params.getParam("class", "")); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/actions/ActionRegex.java: -------------------------------------------------------------------------------- 1 | package me.fromgate.reactions.actions; 2 | 3 | import com.google.common.base.Joiner; 4 | import me.fromgate.reactions.util.Param; 5 | import me.fromgate.reactions.util.Variables; 6 | import me.fromgate.reactions.util.playerselector.PlayerSelectors; 7 | import org.bukkit.entity.Player; 8 | 9 | import java.util.regex.Matcher; 10 | import java.util.regex.Pattern; 11 | 12 | /** 13 | * Created by MaxDikiy on 2017-04-29. 14 | */ 15 | public class ActionRegex extends Action { 16 | 17 | @Override 18 | public boolean execute(Player p, Param params) { 19 | String prefix = params.getParam("prefix", ""); 20 | String regex = params.getParam("regex", ""); 21 | String input = params.getParam("input", removeParams(params.getParam("param-line"))); 22 | 23 | if (input.isEmpty()) return false; 24 | 25 | Pattern pattern = Pattern.compile(regex); 26 | Matcher m = pattern.matcher(input); 27 | int count = -1; 28 | String group; 29 | 30 | while (m.find()) { 31 | count++; 32 | for (int i = 0; i <= m.groupCount(); i++) { 33 | if (m.group(i) != null) group = m.group(i); 34 | else group = ""; 35 | Variables.setTempVar(prefix + "group" + count + "" + i, group); 36 | Variables.setTempVar(prefix + "group_" + count + "_" + i, group); 37 | Variables.setTempVar(prefix + "group:" + count + ":" + i, group); 38 | } 39 | } 40 | return true; 41 | } 42 | 43 | private String removeParams(String message) { 44 | String sb = "(?i)(" + Joiner.on("|").join(PlayerSelectors.getAllKeys()) + 45 | "|hide|regex|prefix):(\\{.*\\}|\\S+)\\s{0,1}"; 46 | return message.replaceAll(sb, ""); 47 | 48 | } 49 | 50 | } -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/actions/ActionShoot.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ReActions, Minecraft bukkit plugin 3 | * (c)2012-2017, fromgate, fromgate@gmail.com 4 | * http://dev.bukkit.org/server-mods/reactions/ 5 | * 6 | * This file is part of ReActions. 7 | * 8 | * ReActions is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * ReActions is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with ReActions. If not, see . 20 | * 21 | */ 22 | 23 | package me.fromgate.reactions.actions; 24 | 25 | import me.fromgate.reactions.util.Param; 26 | import me.fromgate.reactions.util.Shoot; 27 | import org.bukkit.entity.Player; 28 | 29 | public class ActionShoot extends Action { 30 | 31 | @Override 32 | public boolean execute(Player player, Param params) { 33 | Shoot.shoot(player, params); 34 | return true; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/actions/ActionSound.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ReActions, Minecraft bukkit plugin 3 | * (c)2012-2017, fromgate, fromgate@gmail.com 4 | * http://dev.bukkit.org/server-mods/reactions/ 5 | * 6 | * This file is part of ReActions. 7 | * 8 | * ReActions is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * ReActions is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with ReActions. If not, see . 20 | * 21 | */ 22 | 23 | package me.fromgate.reactions.actions; 24 | 25 | import me.fromgate.reactions.util.Param; 26 | import me.fromgate.reactions.util.Util; 27 | import org.bukkit.entity.Player; 28 | 29 | public class ActionSound extends Action { 30 | @Override 31 | public boolean execute(Player p, Param params) { 32 | String str = Util.soundPlay(p == null ? null : p.getLocation(), params); 33 | if (str.isEmpty()) return false; 34 | this.setMessageParam(str); 35 | return true; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/actions/ActionTimer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ReActions, Minecraft bukkit plugin 3 | * (c)2012-2017, fromgate, fromgate@gmail.com 4 | * http://dev.bukkit.org/server-mods/reactions/ 5 | * 6 | * This file is part of ReActions. 7 | * 8 | * ReActions is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * ReActions is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with ReActions. If not, see . 20 | * 21 | */ 22 | 23 | package me.fromgate.reactions.actions; 24 | 25 | import me.fromgate.reactions.timer.Timers; 26 | import me.fromgate.reactions.util.Param; 27 | import org.bukkit.entity.Player; 28 | 29 | public class ActionTimer extends Action { 30 | private boolean pauseTimer; 31 | /* TIMER_STOP("timerstop",false,new ActionTimer(false)), 32 | TIMER_RESUME("timerresume",false,new ActionTimer(true)); 33 | */ 34 | 35 | public ActionTimer(boolean pauseTimer) { 36 | this.pauseTimer = pauseTimer; 37 | } 38 | 39 | @Override 40 | public boolean execute(Player p, Param params) { 41 | String timer = params.getParam("timer", ""); 42 | if (timer.isEmpty()) return false; 43 | return Timers.setPause(timer, pauseTimer); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/actions/ActionTownKick.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ReActions, Minecraft bukkit plugin 3 | * (c)2012-2017, fromgate, fromgate@gmail.com 4 | * http://dev.bukkit.org/server-mods/reactions/ 5 | * 6 | * This file is part of ReActions. 7 | * 8 | * ReActions is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * ReActions is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with ReActions. If not, see . 20 | * 21 | */ 22 | 23 | package me.fromgate.reactions.actions; 24 | 25 | import me.fromgate.reactions.externals.Externals; 26 | import me.fromgate.reactions.externals.RaTowny; 27 | import me.fromgate.reactions.util.Param; 28 | import org.bukkit.entity.Player; 29 | 30 | public class ActionTownKick extends Action { 31 | 32 | @Override 33 | public boolean execute(Player p, Param params) { 34 | if (!Externals.isTownyConnected()) return false; 35 | RaTowny.kickFromTown(p); 36 | return true; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/actions/ActionTownSet.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ReActions, Minecraft bukkit plugin 3 | * (c)2012-2017, fromgate, fromgate@gmail.com 4 | * http://dev.bukkit.org/server-mods/reactions/ 5 | * 6 | * This file is part of ReActions. 7 | * 8 | * ReActions is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * ReActions is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with ReActions. If not, see . 20 | * 21 | */ 22 | 23 | package me.fromgate.reactions.actions; 24 | 25 | import me.fromgate.reactions.externals.Externals; 26 | import me.fromgate.reactions.externals.RaTowny; 27 | import me.fromgate.reactions.util.Param; 28 | import org.bukkit.entity.Player; 29 | 30 | public class ActionTownSet extends Action { 31 | 32 | @Override 33 | public boolean execute(Player p, Param params) { 34 | if (!Externals.isTownyConnected()) return false; 35 | String town = params.getParam("param-line", ""); 36 | if (town.isEmpty()) return false; 37 | RaTowny.addToTown(p, town); 38 | return true; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/actions/ActionVelocityJump.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ReActions, Minecraft bukkit plugin 3 | * (c)2012-2017, fromgate, fromgate@gmail.com 4 | * http://dev.bukkit.org/server-mods/reactions/ 5 | * 6 | * This file is part of ReActions. 7 | * 8 | * ReActions is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * ReActions is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with ReActions. If not, see . 20 | * 21 | */ 22 | 23 | package me.fromgate.reactions.actions; 24 | 25 | import me.fromgate.reactions.util.Locator; 26 | import me.fromgate.reactions.util.Param; 27 | import me.fromgate.reactions.util.VelocityUtil; 28 | import me.fromgate.reactions.util.message.M; 29 | import org.bukkit.Location; 30 | import org.bukkit.entity.Player; 31 | import org.bukkit.util.Vector; 32 | 33 | public class ActionVelocityJump extends Action { 34 | 35 | @Override 36 | public boolean execute(Player p, Param params) { 37 | M.logOnce("velocity-jump-warning", "&cWarning! VELOCITY_JUMP action is under construction. In next version of plugin it could be changed, renamed or removed!"); 38 | String locStr = params.getParam("loc", ""); 39 | if (locStr.isEmpty()) return false; 40 | Location loc = Locator.parseCoordinates(locStr); 41 | if (loc == null) return false; 42 | int jumpHeight = params.getParam("jump", 5); 43 | Vector velocity = VelocityUtil.calculateVelocity(p.getLocation(), loc, jumpHeight); 44 | p.setVelocity(velocity); 45 | return false; 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/actions/ActionWait.java: -------------------------------------------------------------------------------- 1 | package me.fromgate.reactions.actions; 2 | 3 | import me.fromgate.reactions.util.ActVal; 4 | import me.fromgate.reactions.util.Param; 5 | import me.fromgate.reactions.util.waiter.ActionsWaiter; 6 | import org.bukkit.entity.Player; 7 | 8 | import java.util.List; 9 | 10 | public class ActionWait extends Action { 11 | 12 | @Override 13 | public boolean execute(Player p, Param params) { 14 | return false; 15 | } 16 | 17 | public void executeDelayed(Player player, final List actions, final boolean isAction, long time) { 18 | if (actions.isEmpty()) return; 19 | ActionsWaiter.executeDelayed(player, actions, isAction, time); 20 | 21 | /*final String playerStr = player!=null? player.getName() : null; 22 | Bukkit.getScheduler().runTaskLater(ReActions.getPlugin(), new Runnable(){ 23 | @Override 24 | public void run() { 25 | @SuppressWarnings("deprecation") 26 | Player p = playerStr==null ? null : Bukkit.getPlayerExact(playerStr); 27 | if (p==null&& playerStr!=null) return; 28 | Actions.executeActions(p, actions, isAction); 29 | } 30 | }, time); */ 31 | 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/actions/ActionWalkSpeed.java: -------------------------------------------------------------------------------- 1 | package me.fromgate.reactions.actions; 2 | 3 | import me.fromgate.reactions.util.Param; 4 | import org.bukkit.Bukkit; 5 | import org.bukkit.entity.Player; 6 | 7 | /** 8 | * Created by MaxDikiy on 2017-05-16. 9 | */ 10 | public class ActionWalkSpeed extends Action { 11 | @Override 12 | public boolean execute(Player p, Param params) { 13 | Player player = p; 14 | double speed; 15 | if (params.hasAnyParam("speed", "player")) { 16 | String playerName = params.getParam("player", p != null ? p.getName() : ""); 17 | //noinspection deprecation 18 | player = playerName.isEmpty() ? null : Bukkit.getPlayerExact(playerName); 19 | speed = params.getParam("speed", 0); 20 | } else speed = params.getParam("param-line", 0); 21 | return walkSpeedPlayer(player, speed / 10); 22 | } 23 | 24 | public boolean walkSpeedPlayer(Player player, double speed) { 25 | if (player == null || player.isDead() || !player.isOnline()) return false; 26 | if (speed > 1) speed = 1; 27 | if (speed < 0) speed = 0; 28 | player.setWalkSpeed((float) speed); 29 | return true; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/actions/ActionWeSuperPickaxe.java: -------------------------------------------------------------------------------- 1 | package me.fromgate.reactions.actions; 2 | 3 | import me.fromgate.reactions.externals.worldedit.RaWorldEdit; 4 | import me.fromgate.reactions.util.Param; 5 | import org.bukkit.Bukkit; 6 | import org.bukkit.entity.Player; 7 | 8 | /** 9 | * Created by MaxDikiy on 18/10/2017. 10 | */ 11 | public class ActionWeSuperPickaxe extends Action { 12 | @Override 13 | public boolean execute(Player p, Param params) { 14 | Player player = p; 15 | boolean isSP; 16 | if (params.hasAnyParam("value", "player")) { 17 | String playerName = params.getParam("player", p != null ? p.getName() : ""); 18 | isSP = params.getParam("value", false); 19 | //noinspection deprecation 20 | player = playerName.isEmpty() ? null : Bukkit.getPlayerExact(playerName); 21 | } else isSP = params.getParam("param-line", false); 22 | 23 | if (isSP) RaWorldEdit.getSession(player).enableSuperPickAxe(); 24 | else RaWorldEdit.getSession(player).disableSuperPickAxe(); 25 | return true; 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/actions/ActionWeToolControl.java: -------------------------------------------------------------------------------- 1 | package me.fromgate.reactions.actions; 2 | 3 | import me.fromgate.reactions.externals.worldedit.RaWorldEdit; 4 | import me.fromgate.reactions.util.Param; 5 | import org.bukkit.Bukkit; 6 | import org.bukkit.entity.Player; 7 | 8 | /** 9 | * Created by MaxDikiy on 18/10/2017. 10 | */ 11 | public class ActionWeToolControl extends Action { 12 | @Override 13 | public boolean execute(Player p, Param params) { 14 | Player player = p; 15 | boolean isToolControl; 16 | if (params.hasAnyParam("value", "player")) { 17 | String playerName = params.getParam("player", p != null ? p.getName() : ""); 18 | isToolControl = params.getParam("value", false); 19 | //noinspection deprecation 20 | player = playerName.isEmpty() ? null : Bukkit.getPlayerExact(playerName); 21 | } else isToolControl = params.getParam("param-line", false); 22 | 23 | RaWorldEdit.getSession(player).setToolControl(isToolControl); 24 | return true; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/commands/CmdCheck.java: -------------------------------------------------------------------------------- 1 | package me.fromgate.reactions.commands; 2 | 3 | import me.fromgate.reactions.activators.Activator; 4 | import me.fromgate.reactions.activators.Activators; 5 | import me.fromgate.reactions.util.Util; 6 | import me.fromgate.reactions.util.message.M; 7 | import org.bukkit.entity.Player; 8 | 9 | import java.util.ArrayList; 10 | import java.util.HashSet; 11 | import java.util.List; 12 | import java.util.Set; 13 | 14 | @CmdDefine(command = "react", description = M.CMD_CHECK, permission = "reactions.config", 15 | subCommands = {"check"}, allowConsole = false, shortDescription = "&3/react check [radius]") 16 | public class CmdCheck extends Cmd { 17 | 18 | @Override 19 | public boolean execute(Player player, String[] args) { 20 | int radius = args.length > 1 && Util.isIntegerGZ(args[1]) ? Integer.parseInt(args[1]) : 8; 21 | printActivatorsAround(player, radius); 22 | return true; 23 | } 24 | 25 | public void printActivatorsAround(Player player, int radius) { 26 | int playerX = player.getLocation().getBlockX(); 27 | int playerY = player.getLocation().getBlockY(); 28 | int playerZ = player.getLocation().getBlockZ(); 29 | Set lst = new HashSet<>(); 30 | for (int x = playerX - radius; x <= playerX + radius; x++) { 31 | for (int y = playerY - radius; y <= playerY + radius; y++) { 32 | for (int z = playerZ - radius; z <= playerZ + radius; z++) { 33 | List found = Activators.getActivatorInLocation(player.getWorld(), x, y, z); 34 | if (found.isEmpty()) continue; 35 | for (Activator aFound : found) { 36 | lst.add(aFound.toString()); 37 | } 38 | } 39 | } 40 | } 41 | List plst = new ArrayList<>(lst); 42 | M.printPage(player, plst, M.MSG_CHECK, 1, 100, true); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/commands/CmdClear.java: -------------------------------------------------------------------------------- 1 | package me.fromgate.reactions.commands; 2 | 3 | import me.fromgate.reactions.activators.Activators; 4 | import me.fromgate.reactions.util.message.M; 5 | import org.bukkit.command.CommandSender; 6 | 7 | @CmdDefine(command = "react", description = M.CMD_CLEAR, permission = "reactions.config", 8 | subCommands = {"clear"}, allowConsole = true, shortDescription = "&3/react clear [f|a|r]") 9 | public class CmdClear extends Cmd { 10 | @Override 11 | public boolean execute(CommandSender sender, String[] args) { 12 | String activatorId = args.length >= 2 ? args[1] : ""; 13 | if (activatorId.isEmpty()) return false; 14 | String arg2 = args.length >= 3 ? args[2] : ""; 15 | if (Activators.contains(activatorId)) { 16 | if (arg2.equalsIgnoreCase("f") || arg2.equalsIgnoreCase("flag")) { 17 | Activators.clearFlags(activatorId); 18 | Activators.saveActivators(); 19 | M.MSG_CLEARFLAG.print(sender, activatorId); 20 | } else if (arg2.equalsIgnoreCase("a") || arg2.equalsIgnoreCase("action")) { 21 | Activators.clearActions(activatorId); 22 | M.MSG_CLEARACT.print(sender, activatorId); 23 | Activators.saveActivators(); 24 | } else if (arg2.equalsIgnoreCase("r") || arg2.equalsIgnoreCase("reaction")) { 25 | Activators.clearReactions(activatorId); 26 | M.MSG_CLEARREACT.print(sender, activatorId); 27 | Activators.saveActivators(); 28 | } 29 | Activators.saveActivators(); 30 | } else return M.CMD_UNKNOWNBUTTON.print(sender, activatorId); 31 | return false; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/commands/CmdCopy.java: -------------------------------------------------------------------------------- 1 | package me.fromgate.reactions.commands; 2 | 3 | import me.fromgate.reactions.activators.Activators; 4 | import me.fromgate.reactions.util.message.M; 5 | import org.bukkit.command.CommandSender; 6 | 7 | @CmdDefine(command = "react", description = M.CMD_COPY, permission = "reactions.config", 8 | subCommands = {"copy"}, allowConsole = true, shortDescription = "&3/react copy [flag|actions|reactions] ") 9 | public class CmdCopy extends Cmd { 10 | @Override 11 | public boolean execute(CommandSender sender, String[] args) { 12 | if (args.length != 3 && args.length != 4) return false; 13 | String id1 = args.length == 4 ? args[2] : args[1]; 14 | String id2 = args.length == 4 ? args[3] : args[2]; 15 | String copyMode = args.length == 3 ? "all" : args[1]; 16 | if (copyMode.equalsIgnoreCase("all")) { 17 | if (Activators.copyAll(id1, id2)) M.printMSG(sender, "msg_copyall", id1, id2); 18 | else M.printMSG(sender, "msg_copyallfailed", 'c', '4', id1, id2); 19 | } else if (copyMode.equalsIgnoreCase("f") || copyMode.equalsIgnoreCase("flag")) { 20 | if (Activators.copyFlags(id1, id2)) M.printMSG(sender, "msg_copyflags", id1, id2); 21 | else M.printMSG(sender, "msg_copyflagsfailed", 'c', '4', id1, id2); 22 | } else if (copyMode.equalsIgnoreCase("a") || copyMode.equalsIgnoreCase("actions")) { 23 | if (Activators.copyActions(id1, id2)) M.printMSG(sender, "msg_copyactions", id1, id2); 24 | else M.printMSG(sender, "msg_copyactionsfailed", 'c', '4', id1, id2); 25 | } else if (copyMode.equalsIgnoreCase("r") || copyMode.equalsIgnoreCase("me/fromgate/reactions")) { 26 | if (Activators.copyReactions(id1, id2)) M.printMSG(sender, "msg_copyreactions", id1, id2); 27 | else M.printMSG(sender, "msg_copyreactionsfailed", 'c', '4', id1, id2); 28 | } 29 | Activators.saveActivators(); 30 | return true; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/commands/CmdDebug.java: -------------------------------------------------------------------------------- 1 | package me.fromgate.reactions.commands; 2 | 3 | import me.fromgate.reactions.util.RaDebug; 4 | import me.fromgate.reactions.util.message.M; 5 | import org.bukkit.entity.Player; 6 | 7 | @CmdDefine(command = "react", description = M.CMD_DEBUG, permission = "reactions.debug", 8 | subCommands = {"debug", "off|true|false"}, allowConsole = false, shortDescription = "&3/react debug [true|false|off]") 9 | public class CmdDebug extends Cmd { 10 | @Override 11 | public boolean execute(Player player, String[] args) { 12 | String arg = args.length >= 2 ? args[1] : "off"; 13 | if (arg.equalsIgnoreCase("false")) { 14 | RaDebug.setPlayerDebug(player, false); 15 | M.printMSG(player, "cmd_debugfalse"); 16 | } else if (arg.equalsIgnoreCase("true")) { 17 | RaDebug.setPlayerDebug(player, true); 18 | M.printMSG(player, "cmd_debugtrue"); 19 | } else { 20 | RaDebug.offPlayerDebug(player); 21 | M.printMSG(player, "cmd_debugoff"); 22 | } 23 | return true; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/commands/CmdDefine.java: -------------------------------------------------------------------------------- 1 | package me.fromgate.reactions.commands; 2 | 3 | import me.fromgate.reactions.util.message.M; 4 | 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | 8 | @Retention(RetentionPolicy.RUNTIME) 9 | public @interface CmdDefine { 10 | String command(); 11 | 12 | String[] subCommands(); 13 | 14 | String permission(); 15 | 16 | boolean allowConsole() default false; 17 | 18 | M description(); 19 | 20 | String shortDescription(); 21 | } 22 | 23 | -------------------------------------------------------------------------------- /core/src/main/java/me/fromgate/reactions/commands/CmdExec.java: -------------------------------------------------------------------------------- 1 | package me.fromgate.reactions.commands; 2 | 3 | import com.google.common.base.Joiner; 4 | import me.fromgate.reactions.event.EventManager; 5 | import me.fromgate.reactions.util.Param; 6 | import me.fromgate.reactions.util.message.M; 7 | import org.bukkit.command.CommandSender; 8 | 9 | 10 | @CmdDefine(command = "exec", description = M.CMD_EXEC, permission = "reactions.run", 11 | subCommands = {}, allowConsole = true, 12 | shortDescription = "&3/exec [player:] [delay: