├── .gitignore ├── bin ├── .gitignore ├── locations.yml └── comandos.yml ├── .gitattributes ├── src └── rush │ ├── Main.java │ ├── addons │ ├── Mcmmo.java │ ├── LegendChat.java │ ├── Vault.java │ ├── legendchat │ │ ├── McTopTag.java │ │ └── MagnataTag.java │ └── MassiveFactions.java │ ├── utils │ ├── Utils.java │ ├── SystemInfo.java │ ├── TimeFormatter.java │ ├── GuiHolder.java │ ├── objectStream │ │ ├── Wrapper.java │ │ ├── BukkitObjectOutputStream.java │ │ └── BukkitObjectInputStream.java │ ├── manager │ │ ├── ConfigManager.java │ │ └── DataManager.java │ ├── Backup.java │ ├── ReflectionUtils.java │ └── serializer │ │ ├── SerializerOLD.java │ │ ├── Serializer.java │ │ ├── SerializerNEW.java │ │ └── SerializerVeryNEW.java │ ├── apis │ ├── HealthAPI.java │ ├── UltimateFancy.java │ ├── OfflinePlayerAPI.java │ ├── APIS.java │ ├── OnlinePlayersAPI.java │ ├── PingAPI.java │ ├── CrashAPI.java │ ├── SkullAPI.java │ ├── GodModeAPI.java │ ├── TablistAPI.java │ ├── ActionBarAPI.java │ ├── ViewDistanceAPI.java │ ├── TitleAPI.java │ ├── AnvilAPI.java │ └── ItemAPI.java │ ├── entidades │ ├── Warp.java │ ├── Command.java │ ├── Tpa.java │ ├── Kits.java │ ├── Warps.java │ └── Kit.java │ ├── enums │ ├── ItemName.java │ ├── EntityName.java │ ├── PotionName.java │ ├── GameModeName.java │ ├── InventoryName.java │ ├── EnchantmentName.java │ ├── JarType.java │ └── Version.java │ ├── comandos │ ├── ComandoBack.java │ ├── ComandoFeed.java │ ├── ComandoFly.java │ ├── ComandoGod.java │ ├── ComandoHeal.java │ ├── ComandoHome.java │ ├── ComandoKit.java │ ├── ComandoKits.java │ ├── ComandoLixo.java │ ├── ComandoLuz.java │ ├── ComandoPing.java │ ├── ComandoTp.java │ ├── ComandoTpa.java │ ├── ComandoWarp.java │ ├── ComandoAlerta.java │ ├── ComandoChapeu.java │ ├── ComandoClear.java │ ├── ComandoCraft.java │ ├── ComandoDarkit.java │ ├── ComandoDelkit.java │ ├── ComandoEchest.java │ ├── ComandoHomes.java │ ├── ComandoInvsee.java │ ├── ComandoPotion.java │ ├── ComandoSGive.java │ ├── ComandoSkull.java │ ├── ComandoSlime.java │ ├── ComandoSpawn.java │ ├── ComandoSpeed.java │ ├── ComandoSystem.java │ ├── ComandoTitle.java │ ├── ComandoTpall.java │ ├── ComandoTpdeny.java │ ├── ComandoTphere.java │ ├── ComandoVanish.java │ ├── ComandoVerkit.java │ ├── ComandoWarps.java │ ├── ComandoAlertaOLD.java │ ├── ComandoBigorna.java │ ├── ComandoClearChat.java │ ├── ComandoCompactar.java │ ├── ComandoCrashar.java │ ├── ComandoCriarkit.java │ ├── ComandoDelhome.java │ ├── ComandoDelwarp.java │ ├── ComandoDerreter.java │ ├── ComandoDivulgar.java │ ├── ComandoEditarkit.java │ ├── ComandoEnchant.java │ ├── ComandoGamemode.java │ ├── ComandoMundoVip.java │ ├── ComandoPublica.java │ ├── ComandoReparar.java │ ├── ComandoSethome.java │ ├── ComandoSetspawn.java │ ├── ComandoSetwarp.java │ ├── ComandoTpaccept.java │ ├── ComandoTpcancel.java │ ├── ComandoTptoggle.java │ ├── ComandoVerinfo.java │ ├── ComandoWarpOLD.java │ ├── ComandoEditaritem.java │ ├── ComandoEditarplaca.java │ ├── ComandoExecutarSom.java │ ├── ComandoParticular.java │ ├── ComandoSetmundovip.java │ ├── ComandoCompactarOLD.java │ ├── ComandoEditaritemOLD.java │ ├── ComandoEstatisticas.java │ ├── ComandoRenderizacao.java │ ├── ComandoCores.java │ ├── ComandoOnline.java │ └── ComandoSudo.java │ ├── configuracoes │ ├── Settings.java │ ├── Locations.java │ └── Mensagens.java │ ├── recursos │ ├── gerais │ │ ├── CoresNaBigorna.java │ │ ├── CoresNaPlaca.java │ │ ├── ManterXpAoMorrer.java │ │ ├── MensagemDeBoasVindas.java │ │ ├── Outros.java │ │ ├── TitleDeBoasVindas.java │ │ ├── BigornaInfinita.java │ │ ├── ComandosPrimeiroLogin.java │ │ ├── EntrarNoSpawnAoLogar.java │ │ ├── EnderPearlCooldown.java │ │ ├── InvencibilidadeAoTeleportar.java │ │ ├── BloquearMoneyInvalido.java │ │ └── LimiteDePlayers.java │ ├── bloqueadores │ │ ├── BloquearPassarDaBorda.java │ │ ├── BloquearCriarPortal.java │ │ ├── BloquearExplodirItens.java │ │ ├── BloquearMobsDePegaremItensDoChao.java │ │ ├── BloquearQuebrarPlantacoesPulando.java │ │ ├── BloquearCama.java │ │ ├── BloquearCongelarAgua.java │ │ ├── BloquearDerreterGeloENeve.java │ │ ├── BloquearSubirEmVeiculos.java │ │ ├── BloquearNameTag.java │ │ ├── BloquearMobsDePegaremFogoParaOSol.java │ │ ├── BloquearAbrirContainers.java │ │ ├── BloquearSubirNoTetoNether.java │ │ ├── BloquearKickPorDuploLogin.java │ │ ├── BloquearNicksImproprios.java │ │ ├── BloquearCairNoVoid.java │ │ ├── BloquearComandos.java │ │ ├── BloquearCrafts.java │ │ ├── BloquearTeleportPorPortal.java │ │ ├── BloquearKickPorDuploLoginSuper.java │ │ ├── BloquearShiftEmContainers.java │ │ └── BloquearPlacas.java │ └── desativadores │ │ ├── DesativarQuedaDaAreia.java │ │ ├── DesativarQuedaDaBigorna.java │ │ ├── DesativarChuva.java │ │ ├── DesativarFomeNosMundos.java │ │ ├── DesativarMensagemDeEntrada.java │ │ ├── DesativarMensagemDeMorte.java │ │ ├── DesativarQuedaDasFolhas.java │ │ ├── DesativarDanoDoCacto.java │ │ ├── DesativarDanoDoEnderDragon.java │ │ ├── DesativarMensagemDeSaida.java │ │ ├── DesativarDanoDoGhast.java │ │ ├── DesativarDanoDoBlaze.java │ │ ├── DesativarMobsNaturaisOLD.java │ │ ├── DesativarMobsNaturais.java │ │ ├── DesativarCicloDoDia.java │ │ ├── DesativarPropagacaoDoFogo.java │ │ ├── DesativarDanoDoWither.java │ │ └── DesativarFlowDaAguaELava.java │ └── sistemas │ ├── comandos │ ├── BackListener.java │ ├── KitsListener.java │ ├── InvseeListener.java │ ├── EnderChestListener.java │ ├── VanishListener.java │ └── FlyListener.java │ ├── gerais │ ├── AnunciarMorte.java │ ├── CooldownComandos.java │ ├── Tablist.java │ ├── Motd.java │ ├── DroparCabecaAoMorrer.java │ ├── AutoAnuncio.java │ ├── ScoreBoard.java │ ├── DelayComandos.java │ ├── PlayerData.java │ ├── ScoreBoardOLD.java │ ├── DeletarComandos.java │ └── StackMobs.java │ └── spawners │ ├── BloquearTrocarTipoDoSpawnerComOvo.java │ ├── DroparSpawnerAoExplodir.java │ ├── DroparSpawnerAoExplodirOLD.java │ ├── MobSpawner.java │ ├── SistemaDeSpawners.java │ └── SistemaDeSpawnersOLD.java ├── .project ├── resources └── locations.yml ├── .classpath ├── README.md └── .settings └── org.eclipse.jdt.core.prefs /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | *.class 3 | -------------------------------------------------------------------------------- /bin/.gitignore: -------------------------------------------------------------------------------- 1 | /rush/ 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /src/rush/Main.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/Main.java -------------------------------------------------------------------------------- /src/rush/addons/Mcmmo.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/addons/Mcmmo.java -------------------------------------------------------------------------------- /src/rush/utils/Utils.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/utils/Utils.java -------------------------------------------------------------------------------- /src/rush/apis/HealthAPI.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/apis/HealthAPI.java -------------------------------------------------------------------------------- /src/rush/entidades/Warp.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/entidades/Warp.java -------------------------------------------------------------------------------- /src/rush/enums/ItemName.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/enums/ItemName.java -------------------------------------------------------------------------------- /src/rush/addons/LegendChat.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/addons/LegendChat.java -------------------------------------------------------------------------------- /src/rush/entidades/Command.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/entidades/Command.java -------------------------------------------------------------------------------- /src/rush/enums/EntityName.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/enums/EntityName.java -------------------------------------------------------------------------------- /src/rush/enums/PotionName.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/enums/PotionName.java -------------------------------------------------------------------------------- /src/rush/utils/SystemInfo.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/utils/SystemInfo.java -------------------------------------------------------------------------------- /src/rush/apis/UltimateFancy.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/apis/UltimateFancy.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoBack.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoBack.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoFeed.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoFeed.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoFly.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoFly.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoGod.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoGod.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoHeal.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoHeal.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoHome.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoHome.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoKit.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoKit.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoKits.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoKits.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoLixo.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoLixo.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoLuz.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoLuz.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoPing.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoPing.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoTp.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoTp.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoTpa.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoTpa.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoWarp.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoWarp.java -------------------------------------------------------------------------------- /src/rush/enums/GameModeName.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/enums/GameModeName.java -------------------------------------------------------------------------------- /src/rush/enums/InventoryName.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/enums/InventoryName.java -------------------------------------------------------------------------------- /src/rush/utils/TimeFormatter.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/utils/TimeFormatter.java -------------------------------------------------------------------------------- /src/rush/apis/OfflinePlayerAPI.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/apis/OfflinePlayerAPI.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoAlerta.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoAlerta.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoChapeu.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoChapeu.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoClear.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoClear.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoCraft.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoCraft.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoDarkit.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoDarkit.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoDelkit.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoDelkit.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoEchest.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoEchest.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoHomes.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoHomes.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoInvsee.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoInvsee.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoPotion.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoPotion.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoSGive.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoSGive.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoSkull.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoSkull.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoSlime.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoSlime.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoSpawn.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoSpawn.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoSpeed.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoSpeed.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoSystem.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoSystem.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoTitle.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoTitle.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoTpall.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoTpall.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoTpdeny.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoTpdeny.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoTphere.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoTphere.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoVanish.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoVanish.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoVerkit.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoVerkit.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoWarps.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoWarps.java -------------------------------------------------------------------------------- /src/rush/configuracoes/Settings.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/configuracoes/Settings.java -------------------------------------------------------------------------------- /src/rush/enums/EnchantmentName.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/enums/EnchantmentName.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoAlertaOLD.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoAlertaOLD.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoBigorna.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoBigorna.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoClearChat.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoClearChat.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoCompactar.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoCompactar.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoCrashar.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoCrashar.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoCriarkit.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoCriarkit.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoDelhome.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoDelhome.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoDelwarp.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoDelwarp.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoDerreter.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoDerreter.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoDivulgar.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoDivulgar.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoEditarkit.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoEditarkit.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoEnchant.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoEnchant.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoGamemode.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoGamemode.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoMundoVip.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoMundoVip.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoPublica.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoPublica.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoReparar.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoReparar.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoSethome.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoSethome.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoSetspawn.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoSetspawn.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoSetwarp.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoSetwarp.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoTpaccept.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoTpaccept.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoTpcancel.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoTpcancel.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoTptoggle.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoTptoggle.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoVerinfo.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoVerinfo.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoWarpOLD.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoWarpOLD.java -------------------------------------------------------------------------------- /src/rush/configuracoes/Locations.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/configuracoes/Locations.java -------------------------------------------------------------------------------- /src/rush/configuracoes/Mensagens.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/configuracoes/Mensagens.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoEditaritem.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoEditaritem.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoEditarplaca.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoEditarplaca.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoExecutarSom.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoExecutarSom.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoParticular.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoParticular.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoSetmundovip.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoSetmundovip.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoCompactarOLD.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoCompactarOLD.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoEditaritemOLD.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoEditaritemOLD.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoEstatisticas.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoEstatisticas.java -------------------------------------------------------------------------------- /src/rush/comandos/ComandoRenderizacao.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/comandos/ComandoRenderizacao.java -------------------------------------------------------------------------------- /src/rush/recursos/gerais/CoresNaBigorna.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/recursos/gerais/CoresNaBigorna.java -------------------------------------------------------------------------------- /src/rush/recursos/gerais/CoresNaPlaca.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/recursos/gerais/CoresNaPlaca.java -------------------------------------------------------------------------------- /src/rush/sistemas/comandos/BackListener.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/sistemas/comandos/BackListener.java -------------------------------------------------------------------------------- /src/rush/sistemas/comandos/KitsListener.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/sistemas/comandos/KitsListener.java -------------------------------------------------------------------------------- /src/rush/sistemas/gerais/AnunciarMorte.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/sistemas/gerais/AnunciarMorte.java -------------------------------------------------------------------------------- /src/rush/sistemas/comandos/InvseeListener.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/sistemas/comandos/InvseeListener.java -------------------------------------------------------------------------------- /src/rush/sistemas/gerais/CooldownComandos.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/sistemas/gerais/CooldownComandos.java -------------------------------------------------------------------------------- /src/rush/sistemas/comandos/EnderChestListener.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/sistemas/comandos/EnderChestListener.java -------------------------------------------------------------------------------- /src/rush/recursos/bloqueadores/BloquearPassarDaBorda.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/recursos/bloqueadores/BloquearPassarDaBorda.java -------------------------------------------------------------------------------- /src/rush/recursos/desativadores/DesativarQuedaDaAreia.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/recursos/desativadores/DesativarQuedaDaAreia.java -------------------------------------------------------------------------------- /src/rush/recursos/desativadores/DesativarQuedaDaBigorna.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eduardo-mior/System/HEAD/src/rush/recursos/desativadores/DesativarQuedaDaBigorna.java -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | System 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /bin/locations.yml: -------------------------------------------------------------------------------- 1 | AreaNaoVip: 2 | world: world 3 | x: 0.0 4 | y: 100.0 5 | z: 0.0 6 | yaw: 0.0 7 | pitch: 0.0 8 | AreaVip: 9 | world: world 10 | x: 15.0 11 | y: 100.0 12 | z: 15.0 13 | yaw: 0.0 14 | pitch: 0.0 15 | Spawn: 16 | world: world 17 | x: -15.0 18 | y: 100.0 19 | z: -15.0 20 | yaw: 112.50008 21 | pitch: 2.1000016 22 | SpawnVip: 23 | world: world 24 | x: 15.0 25 | y: 100.0 26 | z: -15.0 27 | yaw: 0.0 28 | pitch: 0.0 -------------------------------------------------------------------------------- /resources/locations.yml: -------------------------------------------------------------------------------- 1 | AreaNaoVip: 2 | world: world 3 | x: 0.0 4 | y: 100.0 5 | z: 0.0 6 | yaw: 0.0 7 | pitch: 0.0 8 | AreaVip: 9 | world: world 10 | x: 15.0 11 | y: 100.0 12 | z: 15.0 13 | yaw: 0.0 14 | pitch: 0.0 15 | Spawn: 16 | world: world 17 | x: -15.0 18 | y: 100.0 19 | z: -15.0 20 | yaw: 112.50008 21 | pitch: 2.1000016 22 | SpawnVip: 23 | world: world 24 | x: 15.0 25 | y: 100.0 26 | z: -15.0 27 | yaw: 0.0 28 | pitch: 0.0 -------------------------------------------------------------------------------- /src/rush/recursos/desativadores/DesativarChuva.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.desativadores; 2 | 3 | import org.bukkit.event.EventHandler; 4 | import org.bukkit.event.Listener; 5 | import org.bukkit.event.weather.WeatherChangeEvent; 6 | 7 | public class DesativarChuva implements Listener { 8 | 9 | @EventHandler(ignoreCancelled = true) 10 | public void aoComecarChuva(WeatherChangeEvent e) { 11 | if (e.toWeatherState()) { 12 | e.setCancelled(true); 13 | } 14 | } 15 | 16 | } -------------------------------------------------------------------------------- /src/rush/apis/APIS.java: -------------------------------------------------------------------------------- 1 | package rush.apis; 2 | 3 | public class APIS { 4 | 5 | public static void load() 6 | { 7 | try 8 | { 9 | ItemAPI.load(); 10 | PingAPI.load(); 11 | CrashAPI.load(); 12 | TitleAPI.load(); 13 | AnvilAPI.load(); 14 | GodModeAPI.load(); 15 | TablistAPI.load(); 16 | ActionBarAPI.load(); 17 | ViewDistanceAPI.load(); 18 | OfflinePlayerAPI.load(); 19 | SkullAPI.load(); 20 | } 21 | catch (Throwable e) {} 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /src/rush/recursos/desativadores/DesativarFomeNosMundos.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.desativadores; 2 | 3 | import org.bukkit.event.EventHandler; 4 | import org.bukkit.event.Listener; 5 | import org.bukkit.event.entity.FoodLevelChangeEvent; 6 | 7 | public class DesativarFomeNosMundos implements Listener { 8 | 9 | @EventHandler(ignoreCancelled = true) 10 | public void aoAlterarNivelDaFome(FoodLevelChangeEvent e) { 11 | e.setFoodLevel(20); 12 | e.setCancelled(true); 13 | } 14 | 15 | } -------------------------------------------------------------------------------- /src/rush/comandos/ComandoCores.java: -------------------------------------------------------------------------------- 1 | package rush.comandos; 2 | 3 | import org.bukkit.command.Command; 4 | import org.bukkit.command.CommandExecutor; 5 | import org.bukkit.command.CommandSender; 6 | 7 | import rush.configuracoes.Mensagens; 8 | 9 | public class ComandoCores implements CommandExecutor { 10 | 11 | @Override 12 | public boolean onCommand(CommandSender s, Command cmd, String lbl, String[] args) { 13 | s.sendMessage(Mensagens.Tabela_De_Cores); 14 | return true; 15 | } 16 | } -------------------------------------------------------------------------------- /src/rush/recursos/desativadores/DesativarMensagemDeEntrada.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.desativadores; 2 | 3 | import org.bukkit.event.EventHandler; 4 | import org.bukkit.event.EventPriority; 5 | import org.bukkit.event.Listener; 6 | import org.bukkit.event.player.PlayerJoinEvent; 7 | 8 | public class DesativarMensagemDeEntrada implements Listener { 9 | 10 | @EventHandler(priority = EventPriority.LOWEST) 11 | public void aoEntrar(PlayerJoinEvent e) { 12 | e.setJoinMessage(null); 13 | } 14 | 15 | } -------------------------------------------------------------------------------- /src/rush/recursos/desativadores/DesativarMensagemDeMorte.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.desativadores; 2 | 3 | import org.bukkit.event.EventHandler; 4 | import org.bukkit.event.EventPriority; 5 | import org.bukkit.event.Listener; 6 | import org.bukkit.event.entity.PlayerDeathEvent; 7 | 8 | public class DesativarMensagemDeMorte implements Listener { 9 | 10 | @EventHandler(priority = EventPriority.HIGH) 11 | public void aoMorrer(PlayerDeathEvent e) { 12 | e.setDeathMessage(null); 13 | } 14 | 15 | } -------------------------------------------------------------------------------- /src/rush/recursos/bloqueadores/BloquearCriarPortal.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.bloqueadores; 2 | 3 | import org.bukkit.event.EventHandler; 4 | import org.bukkit.event.EventPriority; 5 | import org.bukkit.event.Listener; 6 | import org.bukkit.event.world.PortalCreateEvent; 7 | 8 | public class BloquearCriarPortal implements Listener { 9 | 10 | @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true) 11 | public void aoCriarPortal(PortalCreateEvent e) { 12 | e.setCancelled(true); 13 | } 14 | 15 | } -------------------------------------------------------------------------------- /src/rush/recursos/desativadores/DesativarQuedaDasFolhas.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.desativadores; 2 | 3 | import org.bukkit.event.EventHandler; 4 | import org.bukkit.event.EventPriority; 5 | import org.bukkit.event.Listener; 6 | import org.bukkit.event.block.LeavesDecayEvent; 7 | 8 | public class DesativarQuedaDasFolhas implements Listener { 9 | 10 | @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) 11 | public void aoCairFolha(LeavesDecayEvent e) { 12 | e.setCancelled(true); 13 | } 14 | 15 | } -------------------------------------------------------------------------------- /src/rush/sistemas/gerais/Tablist.java: -------------------------------------------------------------------------------- 1 | package rush.sistemas.gerais; 2 | 3 | import org.bukkit.event.EventHandler; 4 | import org.bukkit.event.Listener; 5 | import org.bukkit.event.player.PlayerJoinEvent; 6 | 7 | import rush.apis.TablistAPI; 8 | import rush.configuracoes.Settings; 9 | 10 | public class Tablist implements Listener { 11 | 12 | @EventHandler 13 | public void aoEntrarTablist(PlayerJoinEvent e) { 14 | TablistAPI.sendTabList(e.getPlayer(), Settings.Header, Settings.Footer); 15 | } 16 | 17 | } -------------------------------------------------------------------------------- /src/rush/entidades/Tpa.java: -------------------------------------------------------------------------------- 1 | package rush.entidades; 2 | 3 | import java.util.HashMap; 4 | import java.util.HashSet; 5 | import java.util.LinkedHashSet; 6 | 7 | public abstract class Tpa { 8 | 9 | protected static HashMap COOLDOWN = new HashMap<>(); 10 | protected static HashMap> TP_ENVIADOS = new HashMap<>(); 11 | protected static HashMap> TP_RECEBIDOS = new HashMap<>(); 12 | protected static HashSet TOGGLE = new HashSet<>(); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/rush/recursos/bloqueadores/BloquearExplodirItens.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.bloqueadores; 2 | 3 | import org.bukkit.entity.Item; 4 | import org.bukkit.event.EventHandler; 5 | import org.bukkit.event.Listener; 6 | import org.bukkit.event.entity.EntityDamageByEntityEvent; 7 | 8 | public class BloquearExplodirItens implements Listener { 9 | 10 | @EventHandler(ignoreCancelled = true) 11 | public void aoExplodirItem(EntityDamageByEntityEvent e) { 12 | if (e.getEntity() instanceof Item) { 13 | e.setCancelled(true); 14 | } 15 | } 16 | 17 | } -------------------------------------------------------------------------------- /src/rush/recursos/gerais/ManterXpAoMorrer.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.gerais; 2 | 3 | import org.bukkit.entity.Player; 4 | import org.bukkit.event.EventHandler; 5 | import org.bukkit.event.Listener; 6 | import org.bukkit.event.entity.PlayerDeathEvent; 7 | 8 | public class ManterXpAoMorrer implements Listener { 9 | 10 | @EventHandler 11 | public void aoMorrer(PlayerDeathEvent e) { 12 | Player p = e.getEntity(); 13 | if (p.hasPermission("system.manterxp")) { 14 | e.setKeepLevel(true); 15 | e.setDroppedExp(0); 16 | } 17 | } 18 | 19 | } -------------------------------------------------------------------------------- /src/rush/recursos/bloqueadores/BloquearMobsDePegaremItensDoChao.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.bloqueadores; 2 | 3 | import org.bukkit.event.EventHandler; 4 | import org.bukkit.event.EventPriority; 5 | import org.bukkit.event.Listener; 6 | import org.bukkit.event.entity.CreatureSpawnEvent; 7 | 8 | public class BloquearMobsDePegaremItensDoChao implements Listener { 9 | 10 | @EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR) 11 | public void aoNascer(CreatureSpawnEvent e) { 12 | e.getEntity().setCanPickupItems(false); 13 | } 14 | 15 | } -------------------------------------------------------------------------------- /src/rush/apis/OnlinePlayersAPI.java: -------------------------------------------------------------------------------- 1 | package rush.apis; 2 | 3 | import org.bukkit.Bukkit; 4 | import org.bukkit.entity.Player; 5 | 6 | public class OnlinePlayersAPI { 7 | 8 | public static Player[] getOnlinePlayers() { 9 | try { 10 | return Bukkit.getOnlinePlayers().toArray(new Player[Bukkit.getOnlinePlayers().size()]); 11 | } catch (Throwable e) { 12 | try { 13 | return (Player[]) Bukkit.class.getMethod("getOnlinePlayers").invoke(null); 14 | } catch (Throwable e2) { 15 | e2.printStackTrace(); 16 | } 17 | } 18 | return null; 19 | } 20 | } -------------------------------------------------------------------------------- /src/rush/recursos/bloqueadores/BloquearQuebrarPlantacoesPulando.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.bloqueadores; 2 | 3 | import org.bukkit.Material; 4 | import org.bukkit.event.EventHandler; 5 | import org.bukkit.event.Listener; 6 | import org.bukkit.event.entity.EntityChangeBlockEvent; 7 | 8 | public class BloquearQuebrarPlantacoesPulando implements Listener { 9 | 10 | @EventHandler(ignoreCancelled = true) 11 | public void aoQuebrarPlantacao(EntityChangeBlockEvent e) { 12 | if (e.getBlock().getType() == Material.SOIL) 13 | e.setCancelled(true); 14 | } 15 | 16 | } -------------------------------------------------------------------------------- /src/rush/sistemas/gerais/Motd.java: -------------------------------------------------------------------------------- 1 | package rush.sistemas.gerais; 2 | 3 | import org.bukkit.Bukkit; 4 | import org.bukkit.event.EventHandler; 5 | import org.bukkit.event.Listener; 6 | import org.bukkit.event.server.ServerListPingEvent; 7 | 8 | import rush.configuracoes.Settings; 9 | 10 | public class Motd implements Listener { 11 | 12 | @EventHandler 13 | public void definirMotd(ServerListPingEvent e) { 14 | if (Bukkit.hasWhitelist()) { 15 | e.setMotd(Settings.Motd_Manutencao); 16 | } else { 17 | e.setMotd(Settings.Motd_Normal); 18 | } 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /src/rush/recursos/desativadores/DesativarDanoDoCacto.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.desativadores; 2 | 3 | import org.bukkit.event.EventHandler; 4 | import org.bukkit.event.Listener; 5 | import org.bukkit.event.entity.EntityDamageByBlockEvent; 6 | import org.bukkit.event.entity.EntityDamageEvent.DamageCause; 7 | 8 | public class DesativarDanoDoCacto implements Listener { 9 | 10 | @EventHandler(ignoreCancelled = true) 11 | public void aoSofrerDanoParaCacto(EntityDamageByBlockEvent e) { 12 | if (e.getCause() == DamageCause.CONTACT) { 13 | e.setCancelled(true); 14 | } 15 | } 16 | 17 | } -------------------------------------------------------------------------------- /src/rush/recursos/bloqueadores/BloquearCama.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.bloqueadores; 2 | 3 | import org.bukkit.event.EventHandler; 4 | import org.bukkit.event.EventPriority; 5 | import org.bukkit.event.Listener; 6 | import org.bukkit.event.player.PlayerBedEnterEvent; 7 | 8 | public class BloquearCama implements Listener { 9 | 10 | @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true) 11 | public void aoEntrarNaCama(PlayerBedEnterEvent e) { 12 | if (!(e.getPlayer().hasPermission("system.bypass.entrarnacama"))) { 13 | e.setCancelled(true); 14 | } 15 | } 16 | 17 | } -------------------------------------------------------------------------------- /src/rush/comandos/ComandoOnline.java: -------------------------------------------------------------------------------- 1 | package rush.comandos; 2 | 3 | import org.bukkit.command.Command; 4 | import org.bukkit.command.CommandExecutor; 5 | import org.bukkit.command.CommandSender; 6 | 7 | import rush.apis.OnlinePlayersAPI; 8 | import rush.configuracoes.Mensagens; 9 | 10 | public class ComandoOnline implements CommandExecutor { 11 | 12 | @Override 13 | public boolean onCommand(CommandSender s, Command cmd, String lbl, String[] args) { 14 | s.sendMessage(Mensagens.Players_Online.replace("%online%", String.valueOf(OnlinePlayersAPI.getOnlinePlayers().length))); 15 | return true; 16 | } 17 | } -------------------------------------------------------------------------------- /src/rush/recursos/gerais/MensagemDeBoasVindas.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.gerais; 2 | 3 | import org.bukkit.entity.Player; 4 | import org.bukkit.event.EventHandler; 5 | import org.bukkit.event.Listener; 6 | import org.bukkit.event.player.PlayerJoinEvent; 7 | 8 | import rush.configuracoes.Settings; 9 | 10 | public class MensagemDeBoasVindas implements Listener { 11 | 12 | @EventHandler 13 | public void aoEntrar(PlayerJoinEvent e) { 14 | Player p = e.getPlayer(); 15 | for (String mensagem : Settings.Mensagem_De_Boas_Vindas_Mensagem) { 16 | p.sendMessage(mensagem.replace("%player%", p.getName())); 17 | } 18 | } 19 | 20 | } -------------------------------------------------------------------------------- /src/rush/recursos/desativadores/DesativarDanoDoEnderDragon.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.desativadores; 2 | 3 | import org.bukkit.entity.EntityType; 4 | import org.bukkit.event.EventHandler; 5 | import org.bukkit.event.EventPriority; 6 | import org.bukkit.event.Listener; 7 | import org.bukkit.event.entity.EntityExplodeEvent; 8 | 9 | public class DesativarDanoDoEnderDragon implements Listener { 10 | 11 | @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) 12 | public void aoQuebrarOsBlocos(EntityExplodeEvent e) { 13 | if (e.getEntity().getType() == EntityType.ENDER_DRAGON) { 14 | e.setCancelled(true); 15 | } 16 | } 17 | 18 | } -------------------------------------------------------------------------------- /src/rush/recursos/bloqueadores/BloquearCongelarAgua.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.bloqueadores; 2 | 3 | import org.bukkit.Material; 4 | import org.bukkit.event.EventHandler; 5 | import org.bukkit.event.EventPriority; 6 | import org.bukkit.event.Listener; 7 | import org.bukkit.event.block.BlockFormEvent; 8 | 9 | public class BloquearCongelarAgua implements Listener { 10 | 11 | @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) 12 | public void aoCongelar(BlockFormEvent e) { 13 | if (e.getBlock().getType() == Material.WATER || e.getBlock().getType() == Material.STATIONARY_WATER) { 14 | e.setCancelled(true); 15 | } 16 | } 17 | 18 | } -------------------------------------------------------------------------------- /src/rush/recursos/bloqueadores/BloquearDerreterGeloENeve.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.bloqueadores; 2 | 3 | import org.bukkit.Material; 4 | import org.bukkit.event.EventHandler; 5 | import org.bukkit.event.EventPriority; 6 | import org.bukkit.event.Listener; 7 | import org.bukkit.event.block.BlockFadeEvent; 8 | 9 | public class BloquearDerreterGeloENeve implements Listener { 10 | 11 | @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) 12 | public void aoDerreterBlock(BlockFadeEvent e) { 13 | if (e.getBlock().getType() == Material.ICE || e.getBlock().getType() == Material.SNOW) { 14 | e.setCancelled(true); 15 | } 16 | } 17 | 18 | } -------------------------------------------------------------------------------- /src/rush/recursos/gerais/Outros.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.gerais; 2 | 3 | import org.bukkit.event.EventHandler; 4 | import org.bukkit.event.Listener; 5 | import org.bukkit.event.entity.EntityPortalEnterEvent; 6 | import org.bukkit.event.entity.EntityPortalExitEvent; 7 | 8 | public class Outros implements Listener { 9 | 10 | @EventHandler 11 | public void morreuAoEntrar(EntityPortalEnterEvent e) { 12 | if (e.getEntity().isDead()) { 13 | e.getEntity().remove(); 14 | } 15 | } 16 | 17 | @EventHandler 18 | public void morreuAoSair(EntityPortalExitEvent e) { 19 | if (e.getEntity().isDead()) { 20 | e.getEntity().remove(); 21 | } 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /src/rush/recursos/desativadores/DesativarMensagemDeSaida.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.desativadores; 2 | 3 | import org.bukkit.event.EventHandler; 4 | import org.bukkit.event.EventPriority; 5 | import org.bukkit.event.Listener; 6 | import org.bukkit.event.player.PlayerKickEvent; 7 | import org.bukkit.event.player.PlayerQuitEvent; 8 | 9 | public class DesativarMensagemDeSaida implements Listener { 10 | 11 | @EventHandler(priority = EventPriority.HIGH) 12 | public void aoSair(PlayerQuitEvent e) { 13 | e.setQuitMessage(null); 14 | } 15 | 16 | @EventHandler(priority = EventPriority.HIGH) 17 | public void aoSerKickado(PlayerKickEvent e) { 18 | e.setLeaveMessage(null); 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /src/rush/recursos/desativadores/DesativarDanoDoGhast.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.desativadores; 2 | 3 | import org.bukkit.entity.EntityType; 4 | import org.bukkit.event.EventHandler; 5 | import org.bukkit.event.EventPriority; 6 | import org.bukkit.event.Listener; 7 | import org.bukkit.event.entity.ProjectileLaunchEvent; 8 | 9 | public class DesativarDanoDoGhast implements Listener { 10 | 11 | @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) 12 | public void aoLancarAsBolasDeFogo(ProjectileLaunchEvent e) { 13 | if (e.getEntityType() == EntityType.FIREBALL) { 14 | if (e.getEntity().getShooter() != null) { 15 | e.setCancelled(true); 16 | } 17 | } 18 | } 19 | 20 | } -------------------------------------------------------------------------------- /src/rush/recursos/desativadores/DesativarDanoDoBlaze.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.desativadores; 2 | 3 | import org.bukkit.entity.EntityType; 4 | import org.bukkit.event.EventHandler; 5 | import org.bukkit.event.EventPriority; 6 | import org.bukkit.event.Listener; 7 | import org.bukkit.event.entity.ProjectileLaunchEvent; 8 | 9 | public class DesativarDanoDoBlaze implements Listener { 10 | 11 | @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) 12 | public void aoLancarAsBolasDeFogo(ProjectileLaunchEvent e) { 13 | if (e.getEntityType() == EntityType.SMALL_FIREBALL) { 14 | if (e.getEntity().getShooter() != null) { 15 | e.setCancelled(true); 16 | } 17 | } 18 | } 19 | 20 | } -------------------------------------------------------------------------------- /src/rush/recursos/bloqueadores/BloquearSubirEmVeiculos.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.bloqueadores; 2 | 3 | import org.bukkit.entity.Player; 4 | import org.bukkit.event.EventHandler; 5 | import org.bukkit.event.EventPriority; 6 | import org.bukkit.event.Listener; 7 | import org.bukkit.event.vehicle.VehicleEnterEvent; 8 | 9 | public class BloquearSubirEmVeiculos implements Listener { 10 | 11 | @EventHandler(priority = EventPriority.LOWEST) 12 | public void aoEntrarNoVeiculo(VehicleEnterEvent e) { 13 | if (e.getEntered() instanceof Player) { 14 | Player p = (Player) e.getEntered(); 15 | if (!(p.hasPermission("system.bypass.entraremveiculos"))) { 16 | e.setCancelled(true); 17 | } 18 | } 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /src/rush/recursos/bloqueadores/BloquearNameTag.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.bloqueadores; 2 | 3 | import org.bukkit.Material; 4 | import org.bukkit.event.EventHandler; 5 | import org.bukkit.event.EventPriority; 6 | import org.bukkit.event.Listener; 7 | import org.bukkit.event.player.PlayerInteractEntityEvent; 8 | 9 | @SuppressWarnings("all") 10 | public class BloquearNameTag implements Listener { 11 | 12 | @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) 13 | public void onInteract(PlayerInteractEntityEvent e) { 14 | if (e.getPlayer().getItemInHand().getType() == Material.NAME_TAG) { 15 | if (!(e.getPlayer().hasPermission("system.bypass.usarnametag"))) { 16 | e.setCancelled(true); 17 | } 18 | } 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /src/rush/recursos/bloqueadores/BloquearMobsDePegaremFogoParaOSol.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.bloqueadores; 2 | 3 | import org.bukkit.event.EventHandler; 4 | import org.bukkit.event.EventPriority; 5 | import org.bukkit.event.Listener; 6 | import org.bukkit.event.entity.EntityCombustByBlockEvent; 7 | import org.bukkit.event.entity.EntityCombustByEntityEvent; 8 | import org.bukkit.event.entity.EntityCombustEvent; 9 | 10 | public class BloquearMobsDePegaremFogoParaOSol implements Listener { 11 | 12 | @EventHandler(priority = EventPriority.LOWEST) 13 | public void aoPegarFogo(EntityCombustEvent e) { 14 | if (!(e instanceof EntityCombustByEntityEvent) && !(e instanceof EntityCombustByBlockEvent)) { 15 | e.setCancelled(true); 16 | } 17 | } 18 | 19 | } -------------------------------------------------------------------------------- /src/rush/recursos/gerais/TitleDeBoasVindas.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.gerais; 2 | 3 | import org.bukkit.event.EventHandler; 4 | import org.bukkit.event.EventPriority; 5 | import org.bukkit.event.Listener; 6 | import org.bukkit.event.player.PlayerJoinEvent; 7 | 8 | import rush.apis.TitleAPI; 9 | import rush.configuracoes.Settings; 10 | 11 | public class TitleDeBoasVindas implements Listener { 12 | 13 | @EventHandler(priority = EventPriority.LOWEST) 14 | public void aoEntrar(PlayerJoinEvent e) { 15 | String nome = e.getPlayer().getName(); 16 | TitleAPI.sendTitle( 17 | e.getPlayer(), 20, 60, 20, 18 | Settings.Title_De_Boas_Vindas_Titulo.replace("%player%", nome), 19 | Settings.Title_De_Boas_Vindas_Subtitulo.replace("%player%", nome) 20 | ); 21 | } 22 | 23 | } -------------------------------------------------------------------------------- /src/rush/recursos/bloqueadores/BloquearAbrirContainers.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.bloqueadores; 2 | 3 | import org.bukkit.event.EventHandler; 4 | import org.bukkit.event.EventPriority; 5 | import org.bukkit.event.inventory.InventoryOpenEvent; 6 | 7 | import rush.configuracoes.Settings; 8 | 9 | import org.bukkit.event.Listener; 10 | 11 | public class BloquearAbrirContainers implements Listener { 12 | 13 | @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) 14 | public void aoAbrirContainer(InventoryOpenEvent e) { 15 | if (Settings.Bloquear_Abrir_Containers_Containers.contains(e.getInventory().getType())) { 16 | if (!(e.getPlayer().hasPermission("system.bypass.containerbloqueado"))) { 17 | e.setCancelled(true); 18 | return; 19 | } 20 | } 21 | } 22 | 23 | } -------------------------------------------------------------------------------- /src/rush/recursos/desativadores/DesativarMobsNaturaisOLD.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.desativadores; 2 | 3 | import org.bukkit.event.EventHandler; 4 | import org.bukkit.event.EventPriority; 5 | import org.bukkit.event.Listener; 6 | import org.bukkit.event.entity.CreatureSpawnEvent; 7 | import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; 8 | 9 | public class DesativarMobsNaturaisOLD implements Listener { 10 | 11 | @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) 12 | public void aoSpawnarMob(CreatureSpawnEvent e) { 13 | SpawnReason reason = e.getSpawnReason(); 14 | if (reason == SpawnReason.SPAWNER) return; 15 | if (reason == SpawnReason.NATURAL || reason == SpawnReason.CHUNK_GEN || reason == SpawnReason.JOCKEY) { 16 | e.setCancelled(true); 17 | } 18 | } 19 | 20 | } -------------------------------------------------------------------------------- /src/rush/sistemas/spawners/BloquearTrocarTipoDoSpawnerComOvo.java: -------------------------------------------------------------------------------- 1 | package rush.sistemas.spawners; 2 | 3 | import org.bukkit.Material; 4 | import org.bukkit.event.EventHandler; 5 | import org.bukkit.event.EventPriority; 6 | import org.bukkit.event.Listener; 7 | import org.bukkit.event.block.Action; 8 | import org.bukkit.event.player.PlayerInteractEvent; 9 | 10 | public class BloquearTrocarTipoDoSpawnerComOvo implements Listener { 11 | 12 | @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) 13 | public void aoUsarOvo(PlayerInteractEvent e) { 14 | if (e.getAction() == Action.RIGHT_CLICK_BLOCK && e.getClickedBlock().getType() == Material.MOB_SPAWNER && e.getItem() != null && e.getItem().getType() == Material.MONSTER_EGG) { 15 | e.setCancelled(true); 16 | } 17 | } 18 | 19 | } -------------------------------------------------------------------------------- /src/rush/recursos/gerais/BigornaInfinita.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.gerais; 2 | 3 | import org.bukkit.Material; 4 | import org.bukkit.event.EventHandler; 5 | import org.bukkit.event.EventPriority; 6 | import org.bukkit.event.Listener; 7 | import org.bukkit.event.block.Action; 8 | import org.bukkit.event.player.PlayerInteractEvent; 9 | 10 | import rush.apis.AnvilAPI; 11 | 12 | public class BigornaInfinita implements Listener { 13 | 14 | @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) 15 | public void aoUsarBigorna(PlayerInteractEvent e) { 16 | if (e.getAction() == Action.RIGHT_CLICK_BLOCK && e.getClickedBlock().getType() == Material.ANVIL) { 17 | if (!e.getPlayer().isSneaking()) { 18 | AnvilAPI.openAnvil(e.getPlayer()); 19 | e.setCancelled(true); 20 | } 21 | } 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /src/rush/recursos/desativadores/DesativarMobsNaturais.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.desativadores; 2 | 3 | import org.bukkit.event.EventHandler; 4 | import org.bukkit.event.EventPriority; 5 | import org.bukkit.event.Listener; 6 | import org.bukkit.event.entity.CreatureSpawnEvent; 7 | import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; 8 | 9 | public class DesativarMobsNaturais implements Listener { 10 | 11 | @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) 12 | public void aoSpawnarMob(CreatureSpawnEvent e) { 13 | SpawnReason reason = e.getSpawnReason(); 14 | if (reason == SpawnReason.SPAWNER) return; 15 | if (reason == SpawnReason.NATURAL || reason == SpawnReason.CHUNK_GEN || reason == SpawnReason.JOCKEY || reason == SpawnReason.MOUNT) { 16 | e.setCancelled(true); 17 | } 18 | } 19 | 20 | } -------------------------------------------------------------------------------- /src/rush/recursos/gerais/ComandosPrimeiroLogin.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.gerais; 2 | 3 | import org.bukkit.Bukkit; 4 | import org.bukkit.entity.Player; 5 | import org.bukkit.event.EventHandler; 6 | import org.bukkit.event.EventPriority; 7 | import org.bukkit.event.Listener; 8 | import org.bukkit.event.player.PlayerJoinEvent; 9 | 10 | import rush.configuracoes.Settings; 11 | 12 | public class ComandosPrimeiroLogin implements Listener { 13 | 14 | @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) 15 | public void aoLogar(PlayerJoinEvent e) { 16 | Player p = e.getPlayer(); 17 | if (!p.hasPlayedBefore()) { 18 | for (String command : Settings.Lista_Dos_Comandos_Executados_No_Primeiro_Login) { 19 | Bukkit.dispatchCommand(Bukkit.getConsoleSender(), command.replace("%player%", p.getName())); 20 | } 21 | } 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /src/rush/recursos/bloqueadores/BloquearSubirNoTetoNether.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.bloqueadores; 2 | 3 | import org.bukkit.World.Environment; 4 | import org.bukkit.event.EventHandler; 5 | import org.bukkit.event.EventPriority; 6 | import org.bukkit.event.Listener; 7 | import org.bukkit.event.player.PlayerTeleportEvent; 8 | import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; 9 | 10 | import rush.configuracoes.Locations; 11 | 12 | public class BloquearSubirNoTetoNether implements Listener { 13 | 14 | @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) 15 | public void aoTeleportar(PlayerTeleportEvent e) { 16 | if (e.getTo() != null && e.getTo().getWorld().getEnvironment() == Environment.NETHER && e.getTo().getY() > 124.0D) { 17 | e.getPlayer().teleport(Locations.spawn, TeleportCause.PLUGIN); 18 | e.setCancelled(true); 19 | } 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/rush/recursos/desativadores/DesativarCicloDoDia.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.desativadores; 2 | 3 | import org.bukkit.Bukkit; 4 | import org.bukkit.World; 5 | import org.bukkit.scheduler.BukkitRunnable; 6 | 7 | import rush.Main; 8 | 9 | public class DesativarCicloDoDia { 10 | 11 | public static void stopDaylightCycle() { 12 | new BukkitRunnable() { 13 | @Override 14 | public void run() { 15 | for (World w : Bukkit.getWorlds()) { 16 | w.setGameRuleValue("doDaylightCycle", "false"); 17 | w.setTime(6000); 18 | } 19 | } 20 | }.runTaskLater(Main.get(), 600L); 21 | } 22 | 23 | 24 | public static void stopDaylightCycleOLD() { 25 | new BukkitRunnable() { 26 | @Override 27 | public void run() { 28 | for (World w : Bukkit.getWorlds()) { 29 | w.setTime(6000); 30 | } 31 | } 32 | }.runTaskTimer(Main.get(), 600L, 600L); 33 | } 34 | 35 | } -------------------------------------------------------------------------------- /src/rush/enums/JarType.java: -------------------------------------------------------------------------------- 1 | package rush.enums; 2 | 3 | import org.bukkit.Bukkit; 4 | 5 | public enum JarType { 6 | 7 | TACO_SPIGOT, 8 | PAPER_SPIGOT, 9 | SPIGOT, 10 | BUKKIT, 11 | TORCH, 12 | PURPUR, 13 | CAULDRON, 14 | DESCONHECIDA; 15 | 16 | public static JarType getJarType() { 17 | String ver = Bukkit.getVersion(); 18 | if (ver.contains("-Torch")) 19 | return JarType.TORCH; 20 | else if (ver.contains("-Cauldrons")) 21 | return JarType.CAULDRON; 22 | else if (ver.contains("-Purpur")) 23 | return JarType.PURPUR; 24 | else if (ver.contains("-Taco")) 25 | return JarType.TACO_SPIGOT; 26 | else if (ver.contains("-Paper")) 27 | return JarType.PAPER_SPIGOT; 28 | else if (ver.contains("-Spigot")) 29 | return JarType.SPIGOT; 30 | else if (ver.contains("-Bukkit")) 31 | return JarType.BUKKIT; 32 | else 33 | return JarType.DESCONHECIDA; 34 | } 35 | 36 | } -------------------------------------------------------------------------------- /src/rush/recursos/desativadores/DesativarPropagacaoDoFogo.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.desativadores; 2 | 3 | import org.bukkit.event.block.BlockBurnEvent; 4 | import org.bukkit.event.block.BlockIgniteEvent; 5 | import org.bukkit.event.block.BlockIgniteEvent.IgniteCause; 6 | import org.bukkit.event.EventHandler; 7 | import org.bukkit.event.EventPriority; 8 | import org.bukkit.event.Listener; 9 | 10 | public class DesativarPropagacaoDoFogo implements Listener { 11 | 12 | @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true) 13 | public void aoPegarFogo(BlockBurnEvent e) { 14 | e.setCancelled(true); 15 | } 16 | 17 | @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true) 18 | public void aoEspalharFogo(BlockIgniteEvent e) { 19 | if (e.getCause() == IgniteCause.LAVA || e.getCause() == IgniteCause.SPREAD) { 20 | e.setCancelled(true); 21 | } 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /src/rush/recursos/bloqueadores/BloquearKickPorDuploLogin.java: -------------------------------------------------------------------------------- 1 | 2 | package rush.recursos.bloqueadores; 3 | 4 | import org.bukkit.Bukkit; 5 | import org.bukkit.entity.Player; 6 | import org.bukkit.event.EventHandler; 7 | import org.bukkit.event.EventPriority; 8 | import org.bukkit.event.Listener; 9 | import org.bukkit.event.player.AsyncPlayerPreLoginEvent; 10 | import org.bukkit.event.player.AsyncPlayerPreLoginEvent.Result; 11 | 12 | import rush.configuracoes.Mensagens; 13 | 14 | public class BloquearKickPorDuploLogin implements Listener { 15 | 16 | @SuppressWarnings("deprecation") 17 | @EventHandler(priority = EventPriority.LOWEST) 18 | public void aoTentarEntrar(AsyncPlayerPreLoginEvent e) { 19 | Player p = Bukkit.getPlayerExact(e.getName()); 20 | if (p != null) { 21 | e.setKickMessage(Mensagens.Nick_Ja_Logado.replace("%nome%", e.getName())); 22 | e.setLoginResult(Result.KICK_OTHER); 23 | } 24 | } 25 | 26 | } -------------------------------------------------------------------------------- /src/rush/sistemas/comandos/VanishListener.java: -------------------------------------------------------------------------------- 1 | package rush.sistemas.comandos; 2 | 3 | import java.util.HashSet; 4 | 5 | import org.bukkit.entity.Player; 6 | import org.bukkit.event.EventHandler; 7 | import org.bukkit.event.Listener; 8 | import org.bukkit.event.player.PlayerJoinEvent; 9 | import org.bukkit.potion.PotionEffectType; 10 | 11 | import rush.utils.Utils; 12 | 13 | public class VanishListener implements Listener { 14 | 15 | public static HashSet VANISHEDS = new HashSet<>(); 16 | 17 | @EventHandler 18 | public void onJoin(PlayerJoinEvent e) { 19 | Player p = e.getPlayer(); 20 | 21 | if (Utils.hasPotionEffect(p, PotionEffectType.INVISIBILITY, 50)) { 22 | p.removePotionEffect(PotionEffectType.INVISIBILITY); 23 | } 24 | 25 | if (!p.hasPermission("system.vanish.bypass")) { 26 | for (Player vanished : VANISHEDS) { 27 | p.hidePlayer(vanished); 28 | } 29 | } 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /src/rush/sistemas/gerais/DroparCabecaAoMorrer.java: -------------------------------------------------------------------------------- 1 | package rush.sistemas.gerais; 2 | 3 | import java.util.Random; 4 | 5 | import org.bukkit.entity.Player; 6 | import org.bukkit.event.EventHandler; 7 | import org.bukkit.event.Listener; 8 | import org.bukkit.event.entity.PlayerDeathEvent; 9 | import org.bukkit.inventory.ItemStack; 10 | 11 | import rush.apis.SkullAPI; 12 | import rush.configuracoes.Settings; 13 | 14 | public class DroparCabecaAoMorrer implements Listener { 15 | 16 | private static final Random rnd = new Random(); 17 | 18 | @EventHandler 19 | public void aoMorrerDroparCabeca(PlayerDeathEvent e) { 20 | int aleatorio = rnd.nextInt(100); 21 | int chance = Settings.Chance_De_Dropar_Cabeca_Ao_Morrer; 22 | if (aleatorio < chance) { 23 | Player p = e.getEntity(); 24 | ItemStack skull = SkullAPI.getByName(p.getName()); 25 | p.getWorld().dropItem(p.getLocation(), skull); 26 | } 27 | } 28 | 29 | } -------------------------------------------------------------------------------- /src/rush/utils/GuiHolder.java: -------------------------------------------------------------------------------- 1 | package rush.utils; 2 | 3 | import java.util.Map; 4 | 5 | import org.bukkit.Bukkit; 6 | import org.bukkit.inventory.Inventory; 7 | import org.bukkit.inventory.InventoryHolder; 8 | 9 | public class GuiHolder implements InventoryHolder { 10 | 11 | private int id; 12 | private Map properties; 13 | 14 | public GuiHolder(int id) { 15 | this.id = id; 16 | } 17 | 18 | public GuiHolder(int id, Map properties) { 19 | this.id = id; 20 | this.properties = properties; 21 | } 22 | 23 | public int getId() { 24 | return id; 25 | } 26 | 27 | public Object getProperty(String property) { 28 | return properties.get(property); 29 | } 30 | 31 | public boolean hasProperty(String property) { 32 | return properties.containsKey(property); 33 | } 34 | 35 | @Override 36 | public Inventory getInventory() { 37 | return Bukkit.createInventory(this, 27); 38 | } 39 | 40 | } -------------------------------------------------------------------------------- /src/rush/recursos/bloqueadores/BloquearNicksImproprios.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.bloqueadores; 2 | 3 | import org.bukkit.event.EventHandler; 4 | import org.bukkit.event.EventPriority; 5 | import org.bukkit.event.Listener; 6 | import org.bukkit.event.player.PlayerLoginEvent.Result; 7 | 8 | import rush.configuracoes.Mensagens; 9 | import rush.configuracoes.Settings; 10 | 11 | import org.bukkit.event.player.PlayerLoginEvent; 12 | 13 | public class BloquearNicksImproprios implements Listener { 14 | 15 | @EventHandler(priority = EventPriority.LOWEST) 16 | public void aoEntrar(PlayerLoginEvent e) { 17 | String nome = e.getPlayer().getName().toLowerCase(); 18 | for (String nomeBloqueado : Settings.Nicks_Bloqueados) { 19 | if (nome.contains(nomeBloqueado)) { 20 | e.setKickMessage(Mensagens.Nick_Bloqueado.replace("%nick%", nomeBloqueado)); 21 | e.setResult(Result.KICK_OTHER); 22 | return; 23 | } 24 | } 25 | } 26 | 27 | } -------------------------------------------------------------------------------- /src/rush/addons/Vault.java: -------------------------------------------------------------------------------- 1 | package rush.addons; 2 | 3 | import org.bukkit.Bukkit; 4 | import org.bukkit.OfflinePlayer; 5 | import org.bukkit.plugin.RegisteredServiceProvider; 6 | 7 | import net.milkbowl.vault.economy.Economy; 8 | 9 | public class Vault { 10 | 11 | private static Economy economy; 12 | 13 | public static boolean setupEconomy() { 14 | RegisteredServiceProvider rsp = Bukkit.getServicesManager().getRegistration(Economy.class); 15 | if (rsp == null) { 16 | return false; 17 | } 18 | economy = rsp.getProvider(); 19 | return economy != null; 20 | } 21 | 22 | @SuppressWarnings("deprecation") 23 | public static double getBalance(OfflinePlayer off) { 24 | try { 25 | return economy.getBalance(off); 26 | } catch (Throwable e1) { 27 | try { 28 | return economy.getBalance(off.getName()); 29 | } catch (Throwable e2) { 30 | return 0D; 31 | } 32 | } 33 | } 34 | 35 | } -------------------------------------------------------------------------------- /src/rush/utils/objectStream/Wrapper.java: -------------------------------------------------------------------------------- 1 | package rush.utils.objectStream; 2 | 3 | import java.io.Serializable; 4 | import java.util.Map; 5 | 6 | import org.bukkit.configuration.serialization.ConfigurationSerializable; 7 | import org.bukkit.configuration.serialization.ConfigurationSerialization; 8 | 9 | import com.google.common.collect.ImmutableMap; 10 | 11 | class Wrapper & Serializable> implements Serializable { 12 | 13 | private static final long serialVersionUID = -986209235411767547L; 14 | 15 | final T map; 16 | 17 | static Wrapper> newWrapper(ConfigurationSerializable obj) { 18 | return new Wrapper>(ImmutableMap.builder().put(ConfigurationSerialization.SERIALIZED_TYPE_KEY, ConfigurationSerialization.getAlias(obj.getClass())).putAll(obj.serialize()).build()); 19 | } 20 | 21 | private Wrapper(T map) { 22 | this.map = map; 23 | } 24 | 25 | } -------------------------------------------------------------------------------- /src/rush/recursos/desativadores/DesativarDanoDoWither.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.desativadores; 2 | 3 | import org.bukkit.entity.EntityType; 4 | import org.bukkit.event.EventHandler; 5 | import org.bukkit.event.EventPriority; 6 | import org.bukkit.event.Listener; 7 | import org.bukkit.event.entity.EntityChangeBlockEvent; 8 | import org.bukkit.event.entity.ProjectileLaunchEvent; 9 | 10 | public class DesativarDanoDoWither implements Listener { 11 | 12 | @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) 13 | public void aoDestruirOsBlocos(EntityChangeBlockEvent e) { 14 | if (e.getEntity().getType() == EntityType.WITHER) { 15 | e.setCancelled(true); 16 | } 17 | } 18 | 19 | @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) 20 | public void aoLancarAsCabecas(ProjectileLaunchEvent e) { 21 | if (e.getEntityType() == EntityType.WITHER_SKULL) { 22 | if (e.getEntity().getShooter() != null) { 23 | e.setCancelled(true); 24 | } 25 | } 26 | } 27 | 28 | } -------------------------------------------------------------------------------- /src/rush/recursos/bloqueadores/BloquearCairNoVoid.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.bloqueadores; 2 | 3 | import org.bukkit.entity.Player; 4 | import org.bukkit.event.EventHandler; 5 | import org.bukkit.event.EventPriority; 6 | import org.bukkit.event.Listener; 7 | import org.bukkit.event.entity.EntityDamageEvent; 8 | import org.bukkit.event.entity.EntityDamageEvent.DamageCause; 9 | import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; 10 | 11 | import rush.configuracoes.Locations; 12 | 13 | public class BloquearCairNoVoid implements Listener { 14 | 15 | @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) 16 | public void aoSofrerDano(EntityDamageEvent e) { 17 | if (e.getCause() == DamageCause.VOID && e.getEntity() instanceof Player) { 18 | Player p = (Player) e.getEntity(); 19 | if (p.getLocation().getBlockY() < 0) { 20 | e.setCancelled(true); 21 | p.setFallDistance(1); 22 | p.teleport(Locations.spawn, TeleportCause.PLUGIN); 23 | } 24 | } 25 | } 26 | 27 | } -------------------------------------------------------------------------------- /src/rush/recursos/desativadores/DesativarFlowDaAguaELava.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.desativadores; 2 | 3 | import org.bukkit.Location; 4 | import org.bukkit.Material; 5 | import org.bukkit.event.EventHandler; 6 | import org.bukkit.event.EventPriority; 7 | import org.bukkit.event.Listener; 8 | import org.bukkit.event.block.BlockFromToEvent; 9 | 10 | public class DesativarFlowDaAguaELava implements Listener { 11 | 12 | /** 13 | * Powered by kickpost; 14 | */ 15 | 16 | @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) 17 | public void onWater(BlockFromToEvent e) { 18 | Material type = e.getBlock().getType(); 19 | if ( type != Material.WATER 20 | && type != Material.STATIONARY_WATER 21 | && type != Material.LAVA 22 | && type != Material.STATIONARY_LAVA) 23 | return; 24 | 25 | Location partidaLoc = e.getBlock().getLocation(); 26 | Location finalLoc = e.getToBlock().getLocation(); 27 | 28 | if (partidaLoc.getY() != finalLoc.getY()) { 29 | e.setCancelled(true); 30 | } 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /src/rush/recursos/bloqueadores/BloquearComandos.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.bloqueadores; 2 | 3 | import org.bukkit.event.EventHandler; 4 | import org.bukkit.event.EventPriority; 5 | import org.bukkit.event.Listener; 6 | import org.bukkit.event.player.PlayerCommandPreprocessEvent; 7 | 8 | import rush.configuracoes.Mensagens; 9 | import rush.configuracoes.Settings; 10 | 11 | public class BloquearComandos implements Listener { 12 | 13 | @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) 14 | public void aoExecutarComando(PlayerCommandPreprocessEvent e) { 15 | String cmd = e.getMessage().toLowerCase().split(" ")[0]; 16 | for (String blockedCmd : Settings.Lista_Dos_Comandos_Bloqueados) { 17 | if (blockedCmd.equals(cmd) || (cmd.split(":").length > 1 && blockedCmd.equals("/" + cmd.split(":")[1]))) { 18 | if (!(e.getPlayer().hasPermission("system.bypass.comandobloqueado"))) { 19 | e.getPlayer().sendMessage(Mensagens.Comando_Bloqueado); 20 | e.setCancelled(true); 21 | return; 22 | } 23 | } 24 | } 25 | } 26 | 27 | } -------------------------------------------------------------------------------- /src/rush/recursos/bloqueadores/BloquearCrafts.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.bloqueadores; 2 | 3 | import org.bukkit.Material; 4 | import org.bukkit.entity.Player; 5 | import org.bukkit.event.EventHandler; 6 | import org.bukkit.event.EventPriority; 7 | import org.bukkit.event.Listener; 8 | import org.bukkit.event.inventory.PrepareItemCraftEvent; 9 | import org.bukkit.inventory.ItemStack; 10 | 11 | import rush.configuracoes.Settings; 12 | 13 | @SuppressWarnings("all") 14 | public class BloquearCrafts implements Listener { 15 | 16 | @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) 17 | public void aoPrepararCraft(PrepareItemCraftEvent e) { 18 | if (e.getRecipe() != null && e.getRecipe().getResult() != null) { 19 | int itemType = e.getRecipe().getResult().getType().getId(); 20 | if (Settings.Lista_Dos_Crafts_Bloqueados.contains(itemType)) { 21 | Player p = (Player) e.getView().getPlayer(); 22 | if (!(p.hasPermission("system.bypass.craftbloqueado"))) 23 | e.getInventory().setResult(new ItemStack(Material.AIR)); 24 | } 25 | } 26 | } 27 | 28 | } -------------------------------------------------------------------------------- /src/rush/recursos/gerais/EntrarNoSpawnAoLogar.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.gerais; 2 | 3 | import org.bukkit.entity.Player; 4 | import org.bukkit.event.EventHandler; 5 | import org.bukkit.event.EventPriority; 6 | import org.bukkit.event.Listener; 7 | import org.bukkit.event.player.PlayerJoinEvent; 8 | import org.bukkit.event.player.PlayerRespawnEvent; 9 | import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; 10 | 11 | import rush.configuracoes.Locations; 12 | 13 | public class EntrarNoSpawnAoLogar implements Listener { 14 | 15 | @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) 16 | public void aoRenascer(PlayerRespawnEvent e) { 17 | e.setRespawnLocation(Locations.spawn); 18 | } 19 | 20 | @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) 21 | public void aoLogar(PlayerJoinEvent e) { 22 | Player p = e.getPlayer(); 23 | if (p.hasPermission("system.spawn.vip")) { 24 | p.teleport(Locations.spawnVip, TeleportCause.PLUGIN); 25 | } else { 26 | p.teleport(Locations.spawn, TeleportCause.PLUGIN); 27 | } 28 | } 29 | 30 | } -------------------------------------------------------------------------------- /src/rush/recursos/bloqueadores/BloquearTeleportPorPortal.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.bloqueadores; 2 | 3 | import org.bukkit.event.EventHandler; 4 | import org.bukkit.event.EventPriority; 5 | import org.bukkit.event.Listener; 6 | import org.bukkit.event.player.PlayerPortalEvent; 7 | import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; 8 | 9 | import rush.configuracoes.Settings; 10 | 11 | public class BloquearTeleportPorPortal implements Listener { 12 | 13 | @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) 14 | public static void aoTeleportaPorPortal(PlayerPortalEvent e) { 15 | if (!(e.getPlayer().hasPermission("system.bypass.teleportarporportal"))) { 16 | 17 | if (e.getCause() == TeleportCause.NETHER_PORTAL) { 18 | if (Settings.Bloquear_Teleport_Por_Portal_NetherPortal) { 19 | e.setCancelled(true); 20 | return; 21 | } 22 | } 23 | 24 | if (e.getCause() == TeleportCause.END_PORTAL) { 25 | if (Settings.Bloquear_Teleport_Por_Portal_EndPortal) { 26 | e.setCancelled(true); 27 | return; 28 | } 29 | } 30 | } 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /src/rush/sistemas/spawners/DroparSpawnerAoExplodir.java: -------------------------------------------------------------------------------- 1 | package rush.sistemas.spawners; 2 | 3 | import java.util.Random; 4 | 5 | import org.bukkit.Material; 6 | import org.bukkit.block.Block; 7 | import org.bukkit.block.CreatureSpawner; 8 | import org.bukkit.event.EventHandler; 9 | import org.bukkit.event.EventPriority; 10 | import org.bukkit.event.Listener; 11 | import org.bukkit.event.entity.EntityExplodeEvent; 12 | import org.bukkit.inventory.ItemStack; 13 | 14 | import rush.configuracoes.Settings; 15 | 16 | public class DroparSpawnerAoExplodir implements Listener { 17 | 18 | private static Random rnd = new Random(); 19 | 20 | @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) 21 | public void aoExplodir(EntityExplodeEvent e) { 22 | for (Block b : e.blockList()) { 23 | if (b.getType() == Material.MOB_SPAWNER && rnd.nextInt(100) <= Settings.Chance_De_Dropar_Ao_Explodir) { 24 | String type = ((CreatureSpawner) b.getState()).getSpawnedType().name(); 25 | ItemStack spawner = MobSpawner.get(type, 1); 26 | b.getWorld().dropItem(b.getLocation(), spawner); 27 | } 28 | } 29 | } 30 | 31 | } -------------------------------------------------------------------------------- /src/rush/sistemas/spawners/DroparSpawnerAoExplodirOLD.java: -------------------------------------------------------------------------------- 1 | package rush.sistemas.spawners; 2 | 3 | import java.util.Random; 4 | 5 | import org.bukkit.Material; 6 | import org.bukkit.block.Block; 7 | import org.bukkit.block.CreatureSpawner; 8 | import org.bukkit.event.EventHandler; 9 | import org.bukkit.event.EventPriority; 10 | import org.bukkit.event.Listener; 11 | import org.bukkit.event.entity.EntityExplodeEvent; 12 | import org.bukkit.inventory.ItemStack; 13 | 14 | import rush.configuracoes.Settings; 15 | 16 | public class DroparSpawnerAoExplodirOLD implements Listener { 17 | 18 | private static Random rnd = new Random(); 19 | 20 | @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) 21 | public void aoExplodir(EntityExplodeEvent e) { 22 | for (Block b : e.blockList()) { 23 | if (b.getType() == Material.MOB_SPAWNER && rnd.nextInt(100) <= Settings.Chance_De_Dropar_Ao_Explodir) { 24 | String type = ((CreatureSpawner) b.getState()).getSpawnedType().name(); 25 | ItemStack spawner = MobSpawner.getOld(type, 1); 26 | b.getWorld().dropItem(b.getLocation(), spawner); 27 | } 28 | } 29 | } 30 | 31 | } -------------------------------------------------------------------------------- /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/rush/utils/manager/ConfigManager.java: -------------------------------------------------------------------------------- 1 | package rush.utils.manager; 2 | 3 | import java.io.File; 4 | import java.io.FileInputStream; 5 | import java.io.InputStreamReader; 6 | import java.nio.charset.Charset; 7 | 8 | import org.bukkit.configuration.file.FileConfiguration; 9 | import org.bukkit.configuration.file.YamlConfiguration; 10 | 11 | import rush.Main; 12 | 13 | public class ConfigManager { 14 | 15 | public static void createConfig(String file) { 16 | if (!new File(Main.get().getDataFolder(), file + ".yml").exists()) { 17 | Main.get().saveResource(file + ".yml", false); 18 | } 19 | } 20 | 21 | public static FileConfiguration getConfig(String file) { 22 | try { 23 | File arquivo = new File(Main.get().getDataFolder() + File.separator + file + ".yml"); 24 | InputStreamReader arquivoStream = new InputStreamReader(new FileInputStream(arquivo), Charset.forName("UTF-8").name()); 25 | FileConfiguration config = (FileConfiguration)YamlConfiguration.loadConfiguration(arquivoStream); 26 | return config; 27 | } catch (Throwable e) { 28 | e.printStackTrace(); 29 | } 30 | return null; 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /src/rush/recursos/bloqueadores/BloquearKickPorDuploLoginSuper.java: -------------------------------------------------------------------------------- 1 | 2 | package rush.recursos.bloqueadores; 3 | 4 | import org.bukkit.Bukkit; 5 | import org.bukkit.entity.Player; 6 | import org.bukkit.event.EventHandler; 7 | import org.bukkit.event.EventPriority; 8 | import org.bukkit.event.Listener; 9 | import org.bukkit.event.player.PlayerKickEvent; 10 | import org.bukkit.event.player.PlayerLoginEvent; 11 | import org.bukkit.event.player.PlayerLoginEvent.Result; 12 | 13 | import rush.configuracoes.Mensagens; 14 | 15 | public class BloquearKickPorDuploLoginSuper implements Listener { 16 | 17 | @SuppressWarnings("deprecation") 18 | @EventHandler(priority = EventPriority.LOWEST) 19 | public void aoTentarEntrar(PlayerLoginEvent e) { 20 | Player p = Bukkit.getPlayerExact(e.getPlayer().getName()); 21 | if (p != null) { 22 | e.setKickMessage(Mensagens.Nick_Ja_Logado.replace("%nome%", p.getName())); 23 | e.setResult(Result.KICK_OTHER); 24 | } 25 | } 26 | 27 | @EventHandler(priority = EventPriority.LOWEST) 28 | public void aoSerKickado(PlayerKickEvent e) { 29 | if (e.getReason().contains("You logged in from another location")) { 30 | e.setCancelled(true); 31 | } 32 | } 33 | 34 | } -------------------------------------------------------------------------------- /src/rush/apis/PingAPI.java: -------------------------------------------------------------------------------- 1 | package rush.apis; 2 | 3 | import java.lang.reflect.Field; 4 | import java.lang.reflect.Method; 5 | 6 | import org.bukkit.entity.Player; 7 | 8 | import rush.Main; 9 | import rush.utils.ReflectionUtils; 10 | 11 | public class PingAPI { 12 | 13 | private static Method getHandle; 14 | private static Field ping; 15 | 16 | public static String getPlayerPing(Player player) { 17 | try { 18 | 19 | if (Main.getVersion().value < 17) { 20 | Object entityPlayer = getHandle.invoke(player); 21 | return String.valueOf(ping.get(entityPlayer)); 22 | } else { 23 | return String.valueOf((int) player.getClass().getMethod("getPing").invoke(player)); 24 | } 25 | 26 | } catch (Throwable e) { 27 | return "Indisponivel"; 28 | } 29 | } 30 | 31 | static void load() { 32 | try 33 | { 34 | if (Main.getVersion().value < 17) { 35 | Class craftPlayerClass = ReflectionUtils.getOBClass("entity.CraftPlayer"); 36 | Class entityPlayerClass = ReflectionUtils.getNMSClass("EntityPlayer"); 37 | getHandle = craftPlayerClass.getMethod("getHandle"); 38 | ping = entityPlayerClass.getField("ping"); 39 | } 40 | } 41 | catch (Throwable e) {} 42 | } 43 | 44 | } -------------------------------------------------------------------------------- /src/rush/sistemas/gerais/AutoAnuncio.java: -------------------------------------------------------------------------------- 1 | package rush.sistemas.gerais; 2 | 3 | import java.util.List; 4 | import org.bukkit.Sound; 5 | import org.bukkit.entity.Player; 6 | import org.bukkit.scheduler.BukkitRunnable; 7 | import org.bukkit.scheduler.BukkitTask; 8 | 9 | import rush.Main; 10 | import rush.apis.OnlinePlayersAPI; 11 | import rush.configuracoes.Settings; 12 | 13 | public class AutoAnuncio { 14 | 15 | public static BukkitTask XTask; 16 | private static int nMsg = 0; 17 | private static int size = Settings.Lista_De_Anuncios.size() - 1; 18 | private static List mensagens = Settings.Lista_De_Anuncios; 19 | private static Sound som = Settings.Som_Do_Anuncio; 20 | 21 | public static void runMensagens() { 22 | XTask = new BukkitRunnable() { 23 | @Override 24 | public void run() { 25 | String msg = (mensagens.get(nMsg)); 26 | for (Player p : OnlinePlayersAPI.getOnlinePlayers()) { 27 | if (Settings.Destacar_Anuncio) p.sendMessage(" "); 28 | p.sendMessage(msg); 29 | if (Settings.Destacar_Anuncio) p.sendMessage(" "); 30 | if (Settings.Reproduzir_Som_No_Anuncio) p.playSound(p.getLocation(), som, 1, 1); 31 | } 32 | nMsg = nMsg == size ? 0 : nMsg + 1; 33 | } 34 | }.runTaskTimerAsynchronously(Main.get(), 60L, Settings.Delay_Entre_Anuncios * 20L); 35 | } 36 | 37 | } -------------------------------------------------------------------------------- /src/rush/recursos/bloqueadores/BloquearShiftEmContainers.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.bloqueadores; 2 | 3 | import org.bukkit.Material; 4 | import org.bukkit.entity.Player; 5 | import org.bukkit.event.EventHandler; 6 | import org.bukkit.event.EventPriority; 7 | import org.bukkit.event.Listener; 8 | import org.bukkit.event.inventory.InventoryClickEvent; 9 | 10 | import rush.configuracoes.Mensagens; 11 | import rush.configuracoes.Settings; 12 | import rush.enums.InventoryName; 13 | 14 | public class BloquearShiftEmContainers implements Listener { 15 | 16 | @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) 17 | public void aoUsarShift(InventoryClickEvent e) { 18 | if (e.getCurrentItem() == null || e.getCurrentItem().getType() == Material.AIR) { 19 | return; 20 | } 21 | 22 | if (e.getClick().isShiftClick()) { 23 | if (Settings.Bloquear_Shift_Em_Containers_Containers.contains(e.getInventory().getType())) { 24 | if (!(e.getWhoClicked().hasPermission("system.bypass.shiftemcontainer"))) { 25 | String tipo = InventoryName.valueOf(e.getInventory()).getName(); 26 | Player player = (Player) e.getWhoClicked(); 27 | player.sendMessage(Mensagens.Shift_Bloqueado_No_Container.replace("%tipo%", tipo)); 28 | e.setCancelled(true); 29 | return; 30 | } 31 | } 32 | } 33 | } 34 | 35 | } -------------------------------------------------------------------------------- /src/rush/recursos/bloqueadores/BloquearPlacas.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.bloqueadores; 2 | 3 | import org.bukkit.event.EventHandler; 4 | import org.bukkit.event.EventPriority; 5 | import org.bukkit.event.Listener; 6 | import org.bukkit.event.block.SignChangeEvent; 7 | 8 | import rush.configuracoes.Mensagens; 9 | import rush.configuracoes.Settings; 10 | 11 | public class BloquearPlacas implements Listener { 12 | 13 | @EventHandler(priority = EventPriority.LOWEST) 14 | public void aoUsarPlaca(SignChangeEvent e) { 15 | if (!(e.getPlayer().hasPermission("system.bypass.placabloqueada"))) { 16 | 17 | if (Settings.Bloquear_Todas_As_Palavras) { 18 | e.setCancelled(true); 19 | e.getPlayer().sendMessage(Mensagens.Palavras_Desativadas_Na_Placa); 20 | return; 21 | } 22 | 23 | if (Settings.Bloquear_Apenas_Algumas_Palavras) { 24 | String[] linhas = e.getLines(); 25 | for (int i = 0; i < linhas.length; i++) { 26 | String linha = linhas[i].toLowerCase(); 27 | for (String palavra : Settings.Lista_Das_Palavras_Bloqueadas) { 28 | if (linha.contains(palavra)) { 29 | e.setCancelled(true); 30 | e.getPlayer().sendMessage(Mensagens.Palavra_Bloqueada_Na_Placa.replace("%palavra%", palavra)); 31 | e.getBlock().breakNaturally(); 32 | return; 33 | } 34 | } 35 | } 36 | } 37 | } 38 | } 39 | 40 | } -------------------------------------------------------------------------------- /src/rush/addons/legendchat/McTopTag.java: -------------------------------------------------------------------------------- 1 | package rush.addons.legendchat; 2 | 3 | import java.util.List; 4 | 5 | import org.bukkit.event.EventHandler; 6 | import org.bukkit.event.Listener; 7 | import org.bukkit.scheduler.BukkitRunnable; 8 | import org.bukkit.scheduler.BukkitTask; 9 | 10 | import com.gmail.nossr50.database.DatabaseManagerFactory; 11 | import com.gmail.nossr50.datatypes.database.PlayerStat; 12 | 13 | import br.com.devpaulo.legendchat.api.events.ChatMessageEvent; 14 | 15 | import rush.Main; 16 | import rush.configuracoes.Settings; 17 | 18 | public class McTopTag implements Listener { 19 | 20 | public static BukkitTask TTask; 21 | 22 | private static String playerTopOne = ""; 23 | 24 | @EventHandler(ignoreCancelled = true) 25 | public void aoEnviarMenssagem(ChatMessageEvent e) { 26 | if (e.getSender().getName().equals(playerTopOne) && e.getTags().contains("mctop")) { 27 | e.setTagValue("mctop", Settings.mcTopTag_Tag); 28 | } 29 | } 30 | 31 | public static void checkMCTop() { 32 | TTask = new BukkitRunnable() { 33 | @Override 34 | public void run() { 35 | List tops = DatabaseManagerFactory.getDatabaseManager().readLeaderboard(null, 1, 1); 36 | if (!tops.isEmpty()) { 37 | playerTopOne = tops.get(0).name; 38 | } 39 | } 40 | }.runTaskTimerAsynchronously(Main.get(), 60L, Settings.mcTopTag_Tempo_De_Checagem * 20L); 41 | } 42 | 43 | } -------------------------------------------------------------------------------- /src/rush/recursos/gerais/EnderPearlCooldown.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.gerais; 2 | 3 | import java.sql.Timestamp; 4 | import java.util.HashMap; 5 | 6 | import org.bukkit.Material; 7 | import org.bukkit.entity.EntityType; 8 | import org.bukkit.entity.Player; 9 | import org.bukkit.event.EventHandler; 10 | import org.bukkit.event.Listener; 11 | import org.bukkit.event.entity.ProjectileLaunchEvent; 12 | import org.bukkit.inventory.ItemStack; 13 | 14 | import rush.configuracoes.Mensagens; 15 | import rush.configuracoes.Settings; 16 | 17 | @SuppressWarnings("all") 18 | public class EnderPearlCooldown implements Listener { 19 | 20 | private static HashMap COOLDOWN = new HashMap(); 21 | 22 | @EventHandler(ignoreCancelled = true) 23 | public void aoJogarEnder(ProjectileLaunchEvent e) { 24 | if (!(e.getEntity().getShooter() instanceof Player)) return; 25 | if (e.getEntityType() != EntityType.ENDER_PEARL) return; 26 | 27 | Player p = (Player) e.getEntity().getShooter(); 28 | if (COOLDOWN.containsKey(p) && COOLDOWN.get(p).after(new Timestamp(System.currentTimeMillis()))) { 29 | e.setCancelled(true); 30 | p.sendMessage(Mensagens.Aguarde_EnderPearl_Cooldown); 31 | p.getInventory().addItem(new ItemStack(Material.ENDER_PEARL)); 32 | return; 33 | } 34 | COOLDOWN.put(p, new Timestamp(System.currentTimeMillis() + (1000L * Settings.EnderPearl_Cooldown_Cooldown))); 35 | } 36 | 37 | } -------------------------------------------------------------------------------- /src/rush/addons/legendchat/MagnataTag.java: -------------------------------------------------------------------------------- 1 | package rush.addons.legendchat; 2 | 3 | import org.bukkit.Bukkit; 4 | import org.bukkit.OfflinePlayer; 5 | import org.bukkit.event.EventHandler; 6 | import org.bukkit.event.Listener; 7 | import org.bukkit.scheduler.BukkitRunnable; 8 | import org.bukkit.scheduler.BukkitTask; 9 | 10 | import br.com.devpaulo.legendchat.api.events.ChatMessageEvent; 11 | import rush.Main; 12 | import rush.addons.Vault; 13 | import rush.configuracoes.Settings; 14 | 15 | public class MagnataTag implements Listener { 16 | 17 | public static BukkitTask MTask; 18 | 19 | private static String playerMagnata = ""; 20 | private static double balanceMagnata = 0; 21 | 22 | @EventHandler(ignoreCancelled = true) 23 | public void aoEnviarMenssagem(ChatMessageEvent e) { 24 | if (e.getSender().getName().equals(playerMagnata) && e.getTags().contains("magnata")) { 25 | e.setTagValue("magnata", Settings.magnataTag_Tag); 26 | } 27 | } 28 | 29 | public static void checkMagnata() { 30 | MTask = new BukkitRunnable() { 31 | @Override 32 | public void run() { 33 | for (OfflinePlayer off : Bukkit.getOfflinePlayers()) { 34 | double balance = Vault.getBalance(off); 35 | if (balance > balanceMagnata) { 36 | playerMagnata = off.getName(); 37 | balanceMagnata = balance; 38 | } 39 | } 40 | } 41 | }.runTaskTimerAsynchronously(Main.get(), 60L, Settings.magnataTag_Tempo_De_Checagem * 20L); 42 | } 43 | 44 | } -------------------------------------------------------------------------------- /src/rush/sistemas/gerais/ScoreBoard.java: -------------------------------------------------------------------------------- 1 | package rush.sistemas.gerais; 2 | 3 | import java.util.List; 4 | 5 | import org.bukkit.Bukkit; 6 | import org.bukkit.event.EventHandler; 7 | import org.bukkit.event.EventPriority; 8 | import org.bukkit.event.Listener; 9 | import org.bukkit.event.player.PlayerJoinEvent; 10 | import org.bukkit.scoreboard.DisplaySlot; 11 | import org.bukkit.scoreboard.Objective; 12 | import org.bukkit.scoreboard.Score; 13 | import org.bukkit.scoreboard.Scoreboard; 14 | 15 | import rush.configuracoes.Settings; 16 | 17 | public class ScoreBoard implements Listener { 18 | 19 | private static Scoreboard scoreboard; 20 | 21 | @EventHandler(priority = EventPriority.MONITOR) 22 | public void aoEntrarScoreboard(PlayerJoinEvent e) { 23 | e.getPlayer().setScoreboard(scoreboard); 24 | } 25 | 26 | public static void loadScoreBoard() { 27 | String titulo = Settings.ScoreBoard_Titulo; 28 | List linhas = Settings.ScoreBoard_Linhas; 29 | 30 | scoreboard = Bukkit.getScoreboardManager().getNewScoreboard(); 31 | Objective o = scoreboard.registerNewObjective("system.score", "dummy"); 32 | o.setDisplayName(titulo.length() > 32 ? titulo.substring(0, 32) : titulo); 33 | o.setDisplaySlot(DisplaySlot.SIDEBAR); 34 | 35 | int i = linhas.size(); 36 | for (String linha : linhas) { 37 | Score score = o.getScore(linha.length() > 40 ? linha.substring(0, 40) : linha); 38 | score.setScore(--i); 39 | } 40 | } 41 | 42 | } -------------------------------------------------------------------------------- /src/rush/recursos/gerais/InvencibilidadeAoTeleportar.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.gerais; 2 | 3 | import java.util.HashSet; 4 | 5 | import org.bukkit.entity.Player; 6 | import org.bukkit.event.EventHandler; 7 | import org.bukkit.event.EventPriority; 8 | import org.bukkit.event.Listener; 9 | import org.bukkit.event.entity.EntityDamageEvent; 10 | import org.bukkit.event.player.PlayerTeleportEvent; 11 | import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; 12 | import org.bukkit.scheduler.BukkitRunnable; 13 | 14 | import rush.Main; 15 | import rush.configuracoes.Settings; 16 | 17 | public class InvencibilidadeAoTeleportar implements Listener { 18 | 19 | private HashSet protegidos = new HashSet<>(); 20 | 21 | @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) 22 | public void aoTeleportar(PlayerTeleportEvent e) { 23 | if (e.getCause() == TeleportCause.COMMAND || e.getCause() == TeleportCause.PLUGIN) { 24 | protegidos.add(e.getPlayer()); 25 | new BukkitRunnable() { 26 | @Override 27 | public void run() { 28 | protegidos.remove(e.getPlayer()); 29 | } 30 | }.runTaskLater(Main.get(), 20L * Settings.Tempo_De_Invencibilidade_Ao_Teleportar); 31 | } 32 | } 33 | 34 | @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) 35 | public void aoTomarDano(EntityDamageEvent e) { 36 | if (e.getEntity() instanceof Player) { 37 | if (protegidos.contains(e.getEntity())) { 38 | e.setCancelled(true); 39 | } 40 | } 41 | } 42 | 43 | } -------------------------------------------------------------------------------- /src/rush/recursos/gerais/BloquearMoneyInvalido.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.gerais; 2 | 3 | import org.bukkit.event.EventHandler; 4 | import org.bukkit.event.EventPriority; 5 | import org.bukkit.event.Listener; 6 | import org.bukkit.event.player.PlayerCommandPreprocessEvent; 7 | 8 | import rush.configuracoes.Mensagens; 9 | import rush.configuracoes.Settings; 10 | 11 | public class BloquearMoneyInvalido implements Listener { 12 | 13 | @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) 14 | public void aoTentarVender(PlayerCommandPreprocessEvent e) { 15 | String fullCmd = e.getMessage().toLowerCase(); 16 | if (fullCmd.contains("mercado vender -") || fullCmd.contains("market vender -")) { 17 | e.getPlayer().sendMessage(Mensagens.Numero_Invalido.replace("%numero%", "-")); 18 | e.setCancelled(true); 19 | } 20 | } 21 | 22 | @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) 23 | public void aoTentarBugar(PlayerCommandPreprocessEvent e) { 24 | String fullCmd = e.getMessage().toLowerCase(); 25 | String cmd = fullCmd.split(" ")[0]; 26 | for (String moneyCmd : Settings.Comandos_Que_Envolvem_Money) { 27 | if (moneyCmd.equals(cmd) || (cmd.split(":").length > 1 && moneyCmd.equals("/" + cmd.split(":")[1]))) { 28 | if (fullCmd.contains(" null") || fullCmd.contains(" nan") || fullCmd.contains(" -nan") || fullCmd.contains(" -null")) { 29 | e.getPlayer().sendMessage(Mensagens.Money_Null); 30 | e.setCancelled(true); 31 | return; 32 | } 33 | } 34 | } 35 | } 36 | 37 | } -------------------------------------------------------------------------------- /src/rush/sistemas/gerais/DelayComandos.java: -------------------------------------------------------------------------------- 1 | package rush.sistemas.gerais; 2 | 3 | import java.util.Map.Entry; 4 | 5 | import org.bukkit.entity.Player; 6 | import org.bukkit.event.EventHandler; 7 | import org.bukkit.event.EventPriority; 8 | import org.bukkit.event.Listener; 9 | import org.bukkit.event.player.PlayerCommandPreprocessEvent; 10 | import org.bukkit.scheduler.BukkitRunnable; 11 | 12 | import rush.Main; 13 | import rush.configuracoes.Mensagens; 14 | import rush.configuracoes.Settings; 15 | import rush.utils.TimeFormatter; 16 | 17 | public class DelayComandos implements Listener { 18 | 19 | @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true) 20 | public void aoExecutarComando(PlayerCommandPreprocessEvent e) { 21 | final String fullCmd = e.getMessage(); 22 | String cmd = e.getMessage().toLowerCase().split(" ")[0]; 23 | for (Entry delayCmd : Settings.Lista_Dos_Comandos_Com_Delay.entrySet()) { 24 | if (delayCmd.getKey().equals(cmd) || (cmd.split(":").length > 1 && delayCmd.getKey().equals("/" + cmd.split(":")[1]))) { 25 | final Player p = e.getPlayer(); 26 | if (!p.hasPermission("system.bypass.comandodelay")) { 27 | p.sendMessage(Mensagens.Aguarde_Delay_Comandos.replace("%comando%", cmd).replace("%tempo%", TimeFormatter.format(delayCmd.getValue() * 1000L))); 28 | new BukkitRunnable() { 29 | @Override 30 | public void run() { 31 | if (p != null && p.isOnline()) { 32 | p.performCommand(fullCmd); 33 | } 34 | } 35 | }.runTaskLater(Main.get(), 20L * delayCmd.getValue()); 36 | e.setCancelled(true); 37 | } 38 | return; 39 | } 40 | } 41 | } 42 | 43 | } -------------------------------------------------------------------------------- /src/rush/sistemas/gerais/PlayerData.java: -------------------------------------------------------------------------------- 1 | package rush.sistemas.gerais; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | 6 | import org.bukkit.Bukkit; 7 | import org.bukkit.configuration.file.FileConfiguration; 8 | import org.bukkit.event.EventHandler; 9 | import org.bukkit.event.Listener; 10 | import org.bukkit.event.player.PlayerLoginEvent; 11 | import org.bukkit.event.player.PlayerLoginEvent.Result; 12 | 13 | import rush.configuracoes.Mensagens; 14 | import rush.utils.manager.DataManager; 15 | 16 | public class PlayerData implements Listener { 17 | 18 | @EventHandler 19 | public void aoLogar(PlayerLoginEvent e) { 20 | String newPlayer = e.getPlayer().getName(); 21 | File file = DataManager.getFile(newPlayer.toLowerCase(), "playerdata"); 22 | FileConfiguration config = DataManager.getConfiguration(file); 23 | 24 | if (file.exists() && file.length() > 10) { 25 | String oldPlayer = config.getString("Nick"); 26 | if (!newPlayer.equals(oldPlayer)) { 27 | e.setResult(Result.KICK_OTHER); 28 | e.setKickMessage(Mensagens.Nick_Similar.replace("%antigo%", oldPlayer).replace("%novo%", newPlayer)); 29 | } 30 | } else { 31 | if (e.getResult() == Result.ALLOWED) { 32 | DataManager.createFile(file); 33 | config.set("Nick", newPlayer); 34 | config.createSection("Homes"); 35 | config.createSection("Kits"); 36 | try { 37 | config.save(file); 38 | } catch (IOException ex) { 39 | Bukkit.getConsoleSender().sendMessage(Mensagens.Falha_Ao_Salvar.replace("%arquivo%", file.getName())); 40 | } 41 | } 42 | } 43 | } 44 | 45 | } -------------------------------------------------------------------------------- /src/rush/comandos/ComandoSudo.java: -------------------------------------------------------------------------------- 1 | package rush.comandos; 2 | 3 | import org.bukkit.Bukkit; 4 | import org.bukkit.command.Command; 5 | import org.bukkit.command.CommandExecutor; 6 | import org.bukkit.command.CommandSender; 7 | import org.bukkit.entity.Player; 8 | 9 | import rush.apis.OnlinePlayersAPI; 10 | import rush.configuracoes.Mensagens; 11 | 12 | @SuppressWarnings("all") 13 | public class ComandoSudo implements CommandExecutor { 14 | 15 | @Override 16 | public boolean onCommand(CommandSender s, Command cmd, String lbl, String[] args) { 17 | 18 | // Verificando se o player informou menos de 2 argumentos 19 | if (args.length < 2) { 20 | s.sendMessage(Mensagens.Sudo_Comando_Incorreto); 21 | return true; 22 | } 23 | 24 | // Pegando o comando que sera executado 25 | String comando = ""; 26 | for (int i = 1; i < args.length; i++) {comando += args[i] + " ";} 27 | 28 | // Verificando se ele quer executar o comando para todos 29 | if (args[0].equalsIgnoreCase("all") || args[0].equalsIgnoreCase("@a") || args[0].equals("*")) { 30 | for (Player p : OnlinePlayersAPI.getOnlinePlayers()) { 31 | p.chat(comando); 32 | } 33 | s.sendMessage(Mensagens.Sudo_Executado_Com_Sucesso_Para_Todos.replace("%comando%", comando)); 34 | return true; 35 | } 36 | 37 | // Pegando o player e verificando se ele esta online 38 | Player p = Bukkit.getPlayer(args[0]); 39 | if (p == null) { 40 | s.sendMessage(Mensagens.Player_Offline); 41 | return true; 42 | } 43 | 44 | // Executando para o player especificado 45 | p.chat(comando); 46 | s.sendMessage(Mensagens.Sudo_Executado_Com_Sucesso.replace("%player%", p.getName()).replace("%comando%", comando)); 47 | return true; 48 | } 49 | } -------------------------------------------------------------------------------- /src/rush/sistemas/gerais/ScoreBoardOLD.java: -------------------------------------------------------------------------------- 1 | package rush.sistemas.gerais; 2 | 3 | import java.util.List; 4 | 5 | import org.bukkit.Bukkit; 6 | import org.bukkit.event.EventHandler; 7 | import org.bukkit.event.EventPriority; 8 | import org.bukkit.event.Listener; 9 | import org.bukkit.event.player.PlayerJoinEvent; 10 | import org.bukkit.scheduler.BukkitRunnable; 11 | import org.bukkit.scoreboard.DisplaySlot; 12 | import org.bukkit.scoreboard.Objective; 13 | import org.bukkit.scoreboard.Score; 14 | import org.bukkit.scoreboard.Scoreboard; 15 | 16 | import rush.Main; 17 | import rush.configuracoes.Settings; 18 | 19 | @SuppressWarnings("all") 20 | public class ScoreBoardOLD implements Listener { 21 | 22 | private static Scoreboard scoreboard; 23 | 24 | @EventHandler(priority = EventPriority.MONITOR) 25 | public void aoEntrarScoreboard(PlayerJoinEvent e) { 26 | new BukkitRunnable() { 27 | @Override 28 | public void run() { 29 | e.getPlayer().setScoreboard(scoreboard); 30 | } 31 | }.runTaskLater(Main.get(), 10L); 32 | } 33 | 34 | public static void loadScoreBoard() { 35 | String titulo = Settings.ScoreBoard_Titulo; 36 | List linhas = Settings.ScoreBoard_Linhas; 37 | 38 | scoreboard = Bukkit.getScoreboardManager().getNewScoreboard(); 39 | Objective o = scoreboard.registerNewObjective("system.score", "dummy"); 40 | o.setDisplayName(titulo.length() > 32 ? titulo.substring(0, 32) : titulo); 41 | o.setDisplaySlot(DisplaySlot.SIDEBAR); 42 | 43 | int i = linhas.size(); 44 | for (String linha : linhas) { 45 | Score score = o.getScore(Bukkit.getOfflinePlayer(linha.length() > 16 ? linha.substring(0, 16) : linha)); 46 | score.setScore(--i); 47 | } 48 | } 49 | 50 | } -------------------------------------------------------------------------------- /src/rush/sistemas/comandos/FlyListener.java: -------------------------------------------------------------------------------- 1 | package rush.sistemas.comandos; 2 | 3 | import java.util.List; 4 | 5 | import org.bukkit.GameMode; 6 | import org.bukkit.entity.Player; 7 | import org.bukkit.event.EventHandler; 8 | import org.bukkit.event.EventPriority; 9 | import org.bukkit.event.Listener; 10 | import org.bukkit.event.player.PlayerChangedWorldEvent; 11 | import org.bukkit.event.player.PlayerTeleportEvent; 12 | 13 | import rush.configuracoes.Settings; 14 | 15 | public class FlyListener implements Listener { 16 | 17 | @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) 18 | public void aoTeleportar(PlayerTeleportEvent e) { 19 | Player p = e.getPlayer(); 20 | if (p.getAllowFlight()) { 21 | if (!p.hasPermission("system.fly.staff") && isValidGamemode(p.getGameMode())) { 22 | List worlds = Settings.Mundos_Onde_Pode_Usar_Fly; 23 | String world = e.getTo().getWorld().getName(); 24 | if (!worlds.contains(world)) { 25 | p.setFlying(false); 26 | p.setAllowFlight(false); 27 | } 28 | } 29 | } 30 | } 31 | 32 | @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) 33 | public void aoTrocarDeMundo(PlayerChangedWorldEvent e) { 34 | Player p = e.getPlayer(); 35 | if (p.getAllowFlight()) { 36 | if (!p.hasPermission("system.fly.staff") && isValidGamemode(p.getGameMode())) { 37 | List worlds = Settings.Mundos_Onde_Pode_Usar_Fly; 38 | String world = e.getPlayer().getWorld().getName(); 39 | if (!worlds.contains(world)) { 40 | p.setFlying(false); 41 | p.setAllowFlight(false); 42 | } 43 | } 44 | } 45 | } 46 | 47 | private boolean isValidGamemode(GameMode gamemode) { 48 | return gamemode == GameMode.SURVIVAL || gamemode == GameMode.ADVENTURE; 49 | } 50 | 51 | } -------------------------------------------------------------------------------- /src/rush/sistemas/spawners/MobSpawner.java: -------------------------------------------------------------------------------- 1 | package rush.sistemas.spawners; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import org.bukkit.Material; 7 | import org.bukkit.entity.EntityType; 8 | import org.bukkit.inventory.ItemStack; 9 | import org.bukkit.inventory.meta.ItemMeta; 10 | 11 | import rush.apis.ItemAPI; 12 | import rush.configuracoes.Settings; 13 | import rush.enums.EntityName; 14 | 15 | public class MobSpawner { 16 | 17 | public static ItemStack get(String type, int amount) { 18 | ItemStack spawner = new ItemStack(Material.MOB_SPAWNER, amount); 19 | ItemMeta meta = spawner.getItemMeta(); 20 | String entityName = EntityName.valueOf(type).getName(); 21 | List lore = new ArrayList<>(); 22 | for (String line : Settings.Lore_Do_Spawner) lore.add(line.replace("%tipo%", entityName)); 23 | meta.setDisplayName(Settings.Nome_Do_Spawner.replace("%tipo%", entityName)); 24 | meta.setLore(lore); 25 | spawner.setItemMeta(meta); 26 | return ItemAPI.saveInfo(spawner, "Entity", type); 27 | } 28 | 29 | @SuppressWarnings("deprecation") 30 | public static ItemStack getOld(String type, int amount) { 31 | ItemStack spawner = new ItemStack(Material.MOB_SPAWNER, amount); 32 | ItemMeta meta = spawner.getItemMeta(); 33 | short entityId = EntityType.valueOf(type).getTypeId(); 34 | String entityName = EntityName.valueOf(type).getName(); 35 | List lore = new ArrayList<>(); 36 | for (String line : Settings.Lore_Do_Spawner) lore.add(line.replace("%tipo%", entityName)); 37 | meta.setDisplayName(Settings.Nome_Do_Spawner.replace("%tipo%", entityName)); 38 | meta.setLore(lore); 39 | spawner.setItemMeta(meta); 40 | spawner.setDurability(entityId); 41 | return spawner; 42 | } 43 | 44 | } -------------------------------------------------------------------------------- /src/rush/apis/CrashAPI.java: -------------------------------------------------------------------------------- 1 | package rush.apis; 2 | 3 | import java.lang.reflect.Constructor; 4 | import java.lang.reflect.Method; 5 | import java.util.Collections; 6 | import java.util.List; 7 | 8 | import org.bukkit.entity.Player; 9 | 10 | import rush.Main; 11 | import rush.utils.ReflectionUtils; 12 | 13 | public class CrashAPI { 14 | 15 | private static Object packet; 16 | 17 | public static void crashPlayer(Player player) { 18 | try { 19 | ReflectionUtils.sendPacket(player, packet); 20 | } catch (Throwable e) { 21 | e.printStackTrace(); 22 | } 23 | } 24 | 25 | static void load() { 26 | try 27 | { 28 | Object Vec3D; 29 | Class explosionClass; 30 | Class vectorClass = ReflectionUtils.getNMSClass("Vec3D"); 31 | 32 | if (Main.isVeryOldVersion()) { 33 | explosionClass = ReflectionUtils.getNMSClass("Packet60Explosion"); 34 | } else { 35 | explosionClass = ReflectionUtils.getNMSClass("PacketPlayOutExplosion"); 36 | } 37 | 38 | if (Main.isOldVersion()) { 39 | Method Vector3dConstructor = vectorClass.getMethod("a", double.class, double.class, double.class); 40 | Vec3D = Vector3dConstructor.invoke(null, Double.MAX_VALUE, Double.MAX_VALUE, Double.MAX_VALUE); 41 | } else { 42 | Constructor Vector3dConstructor = vectorClass.getConstructor(double.class, double.class, double.class); 43 | Vec3D = Vector3dConstructor.newInstance(Double.MAX_VALUE, Double.MAX_VALUE, Double.MAX_VALUE); 44 | } 45 | 46 | Constructor explosionConstructor = explosionClass.getConstructor(double.class, double.class, double.class, float.class, List.class, vectorClass); 47 | packet = explosionConstructor.newInstance(Double.MAX_VALUE, Double.MAX_VALUE, Double.MAX_VALUE, Float.MAX_VALUE, Collections.emptyList(), Vec3D); 48 | } catch (Throwable e) {} 49 | } 50 | } -------------------------------------------------------------------------------- /src/rush/entidades/Kits.java: -------------------------------------------------------------------------------- 1 | package rush.entidades; 2 | 3 | import java.io.File; 4 | import java.util.Collection; 5 | import java.util.HashMap; 6 | 7 | import org.bukkit.configuration.file.FileConfiguration; 8 | 9 | import rush.utils.manager.DataManager; 10 | 11 | public abstract class Kits { 12 | 13 | private static HashMap KITS = new HashMap<>(); 14 | 15 | public static Kit get(String kit) { 16 | return KITS.get(kit); 17 | } 18 | 19 | public static Collection getAll() { 20 | return KITS.values(); 21 | } 22 | 23 | public static void create(String nome, Kit kit) { 24 | KITS.put(nome, kit); 25 | } 26 | 27 | public static void delete(String nome) { 28 | File file = DataManager.getFile(nome, "kits"); 29 | DataManager.deleteFile(file); 30 | KITS.remove(nome); 31 | } 32 | 33 | public static boolean contains(String nome) { 34 | return KITS.containsKey(nome); 35 | } 36 | 37 | public static void loadKits() { 38 | KITS.clear(); 39 | 40 | File folder = DataManager.getFolder("kits"); 41 | File[] file = folder.listFiles(); 42 | if(file != null) { 43 | for (int i = 0; i < file.length; i++) { 44 | if (file[i] != null && file[i].isFile()) { 45 | FileConfiguration configKit = DataManager.getConfiguration(file[i]); 46 | String id = file[i].getName().replace(".yml", ""); 47 | String nome = configKit.getString("Nome", "§rKit '" + id + "' sem nome! Use /editarkit!"); 48 | String permissao = configKit.getString("Permissao", ""); 49 | long delay = configKit.getLong("Delay"); 50 | String mensagemDeErro = configKit.getString("MensagemDeErro", ""); 51 | String itens = configKit.getString("Itens"); 52 | Kit kit = new Kit(id, permissao, nome, delay, mensagemDeErro, itens); 53 | KITS.put(id, kit); 54 | } 55 | } 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/rush/addons/MassiveFactions.java: -------------------------------------------------------------------------------- 1 | package rush.addons; 2 | 3 | import org.bukkit.Location; 4 | import org.bukkit.entity.Player; 5 | 6 | import com.massivecraft.factions.Factions; 7 | import com.massivecraft.factions.Rel; 8 | import com.massivecraft.factions.entity.BoardColl; 9 | import com.massivecraft.factions.entity.Faction; 10 | import com.massivecraft.factions.entity.MPlayer; 11 | import com.massivecraft.massivecore.ps.PS; 12 | 13 | import rush.configuracoes.Mensagens; 14 | 15 | public class MassiveFactions { 16 | 17 | public static boolean isValidTeleport(Location l, Player p) { 18 | MPlayer mp = MPlayer.get(p); 19 | BoardColl coll = BoardColl.get(); 20 | Faction faction = coll.getFactionAt(PS.valueOf(l)); 21 | if (!faction.getMPlayers().contains(mp) && !(faction.getRelationTo(mp.getFaction()) == Rel.ALLY)) { 22 | if (faction.getId().equals(Factions.ID_NONE) || faction.getId().equals(Factions.ID_WARZONE) || faction.getId().equals(Factions.ID_SAFEZONE)) { 23 | return true; 24 | } else { 25 | p.sendMessage(Mensagens.Sem_Permissao_Teleportar.replace("%faction%", faction.getName())); 26 | return false; 27 | } 28 | } 29 | return true; 30 | } 31 | 32 | public static boolean isValidSetHome(Location l, Player p) { 33 | MPlayer mp = MPlayer.get(p); 34 | BoardColl coll = BoardColl.get(); 35 | Faction faction = coll.getFactionAt(PS.valueOf(l)); 36 | if (!faction.getMPlayers().contains(mp) && !(faction.getRelationTo(mp.getFaction()) == Rel.ALLY)) { 37 | if (faction.getId().equals(Factions.ID_NONE) || faction.getId().equals(Factions.ID_WARZONE) || faction.getId().equals(Factions.ID_SAFEZONE)) { 38 | return true; 39 | } else { 40 | p.sendMessage(Mensagens.Sem_Permissao_Sethome.replace("%faction%", faction.getName())); 41 | return false; 42 | } 43 | } 44 | return true; 45 | } 46 | 47 | } -------------------------------------------------------------------------------- /src/rush/utils/manager/DataManager.java: -------------------------------------------------------------------------------- 1 | package rush.utils.manager; 2 | 3 | import java.io.File; 4 | 5 | import org.bukkit.Bukkit; 6 | import org.bukkit.configuration.file.FileConfiguration; 7 | import org.bukkit.configuration.file.YamlConfiguration; 8 | 9 | import rush.Main; 10 | import rush.configuracoes.Mensagens; 11 | 12 | public class DataManager { 13 | 14 | public static void createFolder(String folder) { 15 | try { 16 | File pasta = new File(Main.get().getDataFolder() + File.separator + folder); 17 | if (!pasta.exists()) { 18 | pasta.mkdirs(); 19 | } 20 | } catch (Throwable e) { 21 | Bukkit.getConsoleSender().sendMessage(Mensagens.Falha_Ao_Criar_Pasta.replace("%pasta%", folder)); 22 | e.printStackTrace(); 23 | } 24 | } 25 | 26 | public static void createFile(File file) { 27 | try { 28 | file.createNewFile(); 29 | } catch (Throwable e) { 30 | Bukkit.getConsoleSender().sendMessage(Mensagens.Falha_Ao_Criar_Arquivo.replace("%arquivo%", file.getName())); 31 | e.printStackTrace(); 32 | } 33 | } 34 | 35 | public static File getFolder(String folder) { 36 | File Arquivo = new File(Main.get().getDataFolder() + File.separator + folder); 37 | return Arquivo; 38 | } 39 | 40 | public static File getFile(String file, String folder) { 41 | File Arquivo = new File(Main.get().getDataFolder() + File.separator + folder, file + ".yml"); 42 | return Arquivo; 43 | } 44 | 45 | public static File getFile(String file) { 46 | File Arquivo = new File(Main.get().getDataFolder() + File.separator + file + ".yml"); 47 | return Arquivo; 48 | } 49 | 50 | public static FileConfiguration getConfiguration(File file) { 51 | FileConfiguration config = (FileConfiguration) YamlConfiguration.loadConfiguration(file); 52 | return config; 53 | } 54 | 55 | public static void deleteFile(File file) { 56 | file.delete(); 57 | } 58 | 59 | } -------------------------------------------------------------------------------- /src/rush/utils/objectStream/BukkitObjectOutputStream.java: -------------------------------------------------------------------------------- 1 | package rush.utils.objectStream; 2 | 3 | import java.io.IOException; 4 | import java.io.ObjectOutputStream; 5 | import java.io.OutputStream; 6 | import java.io.Serializable; 7 | 8 | import org.bukkit.configuration.serialization.ConfigurationSerializable; 9 | 10 | /** 11 | * This class is designed to be used in conjunction with the {@link 12 | * ConfigurationSerializable} API. It translates objects to an internal 13 | * implementation for later deserialization using {@link 14 | * BukkitObjectInputStream}. 15 | *

16 | * Behavior of implementations extending this class is not guaranteed across 17 | * future versions. 18 | */ 19 | public class BukkitObjectOutputStream extends ObjectOutputStream { 20 | 21 | /** 22 | * Constructor provided to mirror super functionality. 23 | * 24 | * @throws IOException 25 | * @throws SecurityException 26 | * @see ObjectOutputStream#ObjectOutputStream() 27 | */ 28 | protected BukkitObjectOutputStream() throws IOException, SecurityException { 29 | super(); 30 | super.enableReplaceObject(true); 31 | } 32 | 33 | /** 34 | * Object output stream decoration constructor. 35 | * 36 | * @param out 37 | * @throws IOException 38 | * @see ObjectOutputStream#ObjectOutputStream(OutputStream) 39 | */ 40 | public BukkitObjectOutputStream(OutputStream out) throws IOException { 41 | super(out); 42 | super.enableReplaceObject(true); 43 | } 44 | 45 | @Override 46 | protected Object replaceObject(Object obj) throws IOException { 47 | if (!(obj instanceof Serializable) && (obj instanceof ConfigurationSerializable)) { 48 | obj = Wrapper.newWrapper((ConfigurationSerializable) obj); 49 | } 50 | 51 | return super.replaceObject(obj); 52 | } 53 | 54 | } -------------------------------------------------------------------------------- /src/rush/apis/SkullAPI.java: -------------------------------------------------------------------------------- 1 | package rush.apis; 2 | 3 | import java.lang.reflect.Field; 4 | import java.util.Base64; 5 | import java.util.Base64.Encoder; 6 | import java.util.UUID; 7 | 8 | import org.bukkit.Material; 9 | import org.bukkit.inventory.ItemStack; 10 | import org.bukkit.inventory.meta.SkullMeta; 11 | 12 | import com.mojang.authlib.GameProfile; 13 | import com.mojang.authlib.properties.Property; 14 | 15 | import rush.utils.ReflectionUtils; 16 | 17 | public class SkullAPI { 18 | 19 | private static Encoder encoder; 20 | private static ItemStack base; 21 | private static Field profileField; 22 | 23 | public static ItemStack getByUrl(String url) { 24 | ItemStack skull = base.clone(); 25 | try { 26 | SkullMeta skullMeta = (SkullMeta) skull.getItemMeta(); 27 | GameProfile profile = new GameProfile(UUID.randomUUID(), null); 28 | byte[] encodedData = encoder.encode(String.format("{textures:{SKIN:{url:\"%s\"}}}", url).getBytes()); 29 | profile.getProperties().put("textures", new Property("textures", new String(encodedData))); 30 | profileField.set(skullMeta, profile); 31 | skull.setItemMeta(skullMeta); 32 | } catch (Throwable e) { 33 | e.printStackTrace(); 34 | } 35 | return skull; 36 | } 37 | 38 | public static ItemStack getByName(String name) { 39 | ItemStack skull = base.clone(); 40 | SkullMeta meta = (SkullMeta) skull.getItemMeta(); 41 | meta.setOwner(name); 42 | skull.setItemMeta(meta); 43 | return skull; 44 | } 45 | 46 | static void load() { 47 | try 48 | { 49 | base = new ItemStack(Material.SKULL_ITEM); 50 | base.setDurability((short) 3); 51 | Class skullMetaClass = ReflectionUtils.getOBClass("inventory.CraftMetaSkull"); 52 | profileField = skullMetaClass.getDeclaredField("profile"); 53 | profileField.setAccessible(true); 54 | encoder = Base64.getEncoder(); 55 | } 56 | catch (Throwable e) {} 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /src/rush/apis/GodModeAPI.java: -------------------------------------------------------------------------------- 1 | package rush.apis; 2 | 3 | import java.lang.reflect.Field; 4 | import java.lang.reflect.Method; 5 | 6 | import org.bukkit.entity.Player; 7 | 8 | import rush.Main; 9 | import rush.utils.ReflectionUtils; 10 | 11 | public class GodModeAPI { 12 | 13 | private static Method getHandle; 14 | private static Field abilitiesField; 15 | private static Field isInvulnerableField; 16 | 17 | public static void setGodMode(Player player, boolean enabled) { 18 | try { 19 | 20 | if (Main.getVersion().value < 17) { 21 | Object entityPlayer = getHandle.invoke(player); 22 | Object abilities = abilitiesField.get(entityPlayer); 23 | isInvulnerableField.set(abilities, enabled); 24 | } else { 25 | player.getClass().getMethod("setInvulnerable", boolean.class).invoke(player, enabled); 26 | } 27 | 28 | } catch (Throwable e) { 29 | e.printStackTrace(); 30 | } 31 | } 32 | 33 | public static boolean getGodMode(Player player) { 34 | try { 35 | 36 | if (Main.getVersion().value < 17) { 37 | Object entityPlayer = getHandle.invoke(player); 38 | Object abilities = abilitiesField.get(entityPlayer); 39 | return isInvulnerableField.getBoolean(abilities); 40 | } else { 41 | return (boolean) player.getClass().getMethod("isInvulnerable").invoke(player); 42 | } 43 | 44 | } catch (Throwable e) { 45 | e.printStackTrace(); 46 | return false; 47 | } 48 | } 49 | 50 | static void load() { 51 | try 52 | { 53 | if (Main.getVersion().value < 17) { 54 | Class craftPlayerClass = ReflectionUtils.getOBClass("entity.CraftPlayer"); 55 | Class entityPlayerClass = ReflectionUtils.getNMSClass("EntityPlayer"); 56 | Class playerAbilitiesClass = ReflectionUtils.getNMSClass("PlayerAbilities"); 57 | getHandle = craftPlayerClass.getMethod("getHandle"); 58 | abilitiesField = entityPlayerClass.getField("abilities"); 59 | isInvulnerableField =playerAbilitiesClass.getField("isInvulnerable"); 60 | } 61 | } 62 | catch (Throwable e) {} 63 | } 64 | 65 | } -------------------------------------------------------------------------------- /src/rush/recursos/gerais/LimiteDePlayers.java: -------------------------------------------------------------------------------- 1 | package rush.recursos.gerais; 2 | 3 | import java.util.Random; 4 | 5 | import org.bukkit.Bukkit; 6 | import org.bukkit.entity.Player; 7 | import org.bukkit.event.EventHandler; 8 | import org.bukkit.event.EventPriority; 9 | import org.bukkit.event.Listener; 10 | import org.bukkit.event.player.PlayerLoginEvent; 11 | import org.bukkit.event.player.PlayerLoginEvent.Result; 12 | import org.bukkit.event.server.ServerListPingEvent; 13 | import org.bukkit.scheduler.BukkitRunnable; 14 | 15 | import rush.Main; 16 | import rush.configuracoes.Mensagens; 17 | import rush.configuracoes.Settings; 18 | 19 | public class LimiteDePlayers implements Listener { 20 | 21 | @EventHandler 22 | public void aoVerMotd(ServerListPingEvent e) { 23 | e.setMaxPlayers(Settings.Limite_De_Players); 24 | } 25 | 26 | @EventHandler(priority = EventPriority.LOWEST) 27 | public void aoEntrar(PlayerLoginEvent e) { 28 | int playersOnline = Bukkit.getOnlinePlayers().size(); 29 | int limite = Settings.Limite_De_Players; 30 | if (playersOnline >= limite) { 31 | if (!e.getPlayer().hasPermission("system.lotado.entrar")) { 32 | e.setResult(Result.KICK_FULL); 33 | e.setKickMessage(Mensagens.Servidor_Lotado); 34 | } else if (Settings.Kickar_Sem_Vip) { 35 | Player[] players = Bukkit.getOnlinePlayers().toArray(new Player[playersOnline]); 36 | int cont = 0; 37 | while(cont < 4) { 38 | int random = new Random().nextInt(playersOnline); 39 | Player p = players[random]; 40 | if (p.hasPermission("system.lotado.entrar")) { 41 | cont++; 42 | continue; 43 | } else { 44 | kickPlayer(p); 45 | return; 46 | } 47 | } 48 | } 49 | } 50 | } 51 | 52 | private void kickPlayer(Player p) { 53 | p.sendMessage(Mensagens.Aviso_Dar_Lugar_Ao_Vip); 54 | new BukkitRunnable() { 55 | @Override 56 | public void run() { 57 | if (p != null) 58 | p.kickPlayer(Mensagens.Kick_Dar_Lugar_Ao_Vip); 59 | } 60 | }.runTaskLater(Main.get(), 20L * Settings.Tempo_Para_Ser_Kick); 61 | } 62 | 63 | } -------------------------------------------------------------------------------- /src/rush/apis/TablistAPI.java: -------------------------------------------------------------------------------- 1 | package rush.apis; 2 | 3 | import java.lang.reflect.Field; 4 | import java.lang.reflect.Method; 5 | 6 | import org.bukkit.entity.Player; 7 | 8 | import rush.Main; 9 | import rush.utils.ReflectionUtils; 10 | 11 | public class TablistAPI { 12 | 13 | private static Class ppop; 14 | private static Method a; 15 | private static Field headerField; 16 | private static Field footerField; 17 | 18 | public static void sendTabList(Player player, String header, String footer) { 19 | try { 20 | 21 | if (Main.getVersion().value < 17) { 22 | Object tabHeader = a.invoke(null, "{\"text\":\"" + header + "\"}"); 23 | Object tabFooter = a.invoke(null, "{\"text\":\"" + footer + "\"}"); 24 | Object packet = ppop.newInstance(); 25 | 26 | headerField.set(packet, tabHeader); 27 | footerField.set(packet, tabFooter); 28 | 29 | ReflectionUtils.sendPacket(player, packet); 30 | } else { 31 | player.getClass().getMethod("setPlayerListHeaderFooter", String.class, String.class).invoke(player, header, footer); 32 | } 33 | 34 | } catch (Throwable e) { 35 | e.printStackTrace(); 36 | } 37 | } 38 | 39 | static void load() { 40 | try 41 | { 42 | if (Main.getVersion().value < 17) { 43 | Class icbc = ReflectionUtils.getNMSClass("IChatBaseComponent"); 44 | ppop = ReflectionUtils.getNMSClass("PacketPlayOutPlayerListHeaderFooter"); 45 | 46 | if (icbc.getDeclaredClasses().length > 0) { 47 | a = icbc.getDeclaredClasses()[0].getMethod("a", String.class); 48 | } else { 49 | a = ReflectionUtils.getNMSClass("ChatSerializer").getMethod("a", String.class); 50 | } 51 | 52 | int h, f; 53 | if (ppop.getDeclaredFields().length > 2) { 54 | h = 2; 55 | f = 3; 56 | } else { 57 | h = 0; 58 | f = 1; 59 | } 60 | 61 | headerField = ppop.getDeclaredFields()[h]; 62 | footerField = ppop.getDeclaredFields()[f]; 63 | headerField.setAccessible(true); 64 | footerField.setAccessible(true); 65 | } 66 | } 67 | catch (Throwable e) {} 68 | } 69 | } -------------------------------------------------------------------------------- /src/rush/sistemas/spawners/SistemaDeSpawners.java: -------------------------------------------------------------------------------- 1 | package rush.sistemas.spawners; 2 | 3 | import org.bukkit.Material; 4 | import org.bukkit.block.Block; 5 | import org.bukkit.block.CreatureSpawner; 6 | import org.bukkit.enchantments.Enchantment; 7 | import org.bukkit.entity.EntityType; 8 | import org.bukkit.entity.Player; 9 | import org.bukkit.event.EventHandler; 10 | import org.bukkit.event.EventPriority; 11 | import org.bukkit.event.Listener; 12 | import org.bukkit.event.block.BlockBreakEvent; 13 | import org.bukkit.event.block.BlockPlaceEvent; 14 | import org.bukkit.inventory.ItemStack; 15 | 16 | import rush.apis.ItemAPI; 17 | import rush.configuracoes.Mensagens; 18 | 19 | public class SistemaDeSpawners implements Listener { 20 | 21 | @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) 22 | public void aoQuebrarSpawner(BlockBreakEvent e) { 23 | Player p = e.getPlayer(); 24 | Block b = e.getBlock(); 25 | if (b.getType() == Material.MOB_SPAWNER) { 26 | if (p.getItemInHand().getType().name().contains("PICKAXE")) { 27 | if (p.getItemInHand().getItemMeta().hasEnchant(Enchantment.SILK_TOUCH)) { 28 | CreatureSpawner mobSpawner = (CreatureSpawner) b.getState(); 29 | String type = mobSpawner.getSpawnedType().name(); 30 | ItemStack spawner = MobSpawner.get(type, 1); 31 | for (ItemStack is : p.getInventory().addItem(spawner).values()) { 32 | b.getWorld().dropItem(b.getLocation(), is); 33 | p.sendMessage(Mensagens.Inventario_Cheio_Quebrou); 34 | } 35 | e.setExpToDrop(0); 36 | } 37 | } 38 | } 39 | } 40 | 41 | @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) 42 | public void aoColocarSpawner(BlockPlaceEvent e) { 43 | Block b = e.getBlock(); 44 | if (b.getType() == Material.MOB_SPAWNER) { 45 | try { 46 | CreatureSpawner mobSpawner = (CreatureSpawner) b.getState(); 47 | String type = ItemAPI.getInfo(e.getItemInHand(), "Entity"); 48 | mobSpawner.setSpawnedType(EntityType.valueOf(type)); 49 | mobSpawner.update(true); 50 | } catch (Throwable ex) { 51 | e.getPlayer().sendMessage(Mensagens.Spawner_Bugado); 52 | } 53 | } 54 | } 55 | 56 | } -------------------------------------------------------------------------------- /src/rush/sistemas/spawners/SistemaDeSpawnersOLD.java: -------------------------------------------------------------------------------- 1 | package rush.sistemas.spawners; 2 | 3 | import org.bukkit.Material; 4 | import org.bukkit.block.Block; 5 | import org.bukkit.block.CreatureSpawner; 6 | import org.bukkit.enchantments.Enchantment; 7 | import org.bukkit.entity.EntityType; 8 | import org.bukkit.entity.Player; 9 | import org.bukkit.event.EventHandler; 10 | import org.bukkit.event.EventPriority; 11 | import org.bukkit.event.Listener; 12 | import org.bukkit.event.block.BlockBreakEvent; 13 | import org.bukkit.event.block.BlockPlaceEvent; 14 | import org.bukkit.inventory.ItemStack; 15 | 16 | import rush.configuracoes.Mensagens; 17 | 18 | public class SistemaDeSpawnersOLD implements Listener { 19 | 20 | @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) 21 | public void aoQuebrarSpawner(BlockBreakEvent e) { 22 | Player p = e.getPlayer(); 23 | Block b = e.getBlock(); 24 | if (b.getType() == Material.MOB_SPAWNER) { 25 | if (p.getItemInHand().getType().name().contains("PICKAXE")) { 26 | if (p.getItemInHand().getItemMeta().hasEnchant(Enchantment.SILK_TOUCH)) { 27 | CreatureSpawner mobSpawner = (CreatureSpawner) b.getState(); 28 | String type = mobSpawner.getSpawnedType().name(); 29 | ItemStack spawner = MobSpawner.getOld(type, 1); 30 | for (ItemStack is : p.getInventory().addItem(spawner).values()) { 31 | b.getWorld().dropItem(b.getLocation(), is); 32 | p.sendMessage(Mensagens.Inventario_Cheio_Quebrou); 33 | } 34 | e.setExpToDrop(0); 35 | } 36 | } 37 | } 38 | } 39 | 40 | @SuppressWarnings("deprecation") 41 | @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) 42 | public void aoColocarSpawner(BlockPlaceEvent e) { 43 | Block b = e.getBlock(); 44 | if (b.getType() == Material.MOB_SPAWNER) { 45 | try { 46 | CreatureSpawner mobSpawner = (CreatureSpawner) b.getState(); 47 | short type = e.getItemInHand().getDurability(); 48 | mobSpawner.setSpawnedType(EntityType.fromId(type)); 49 | mobSpawner.update(true); 50 | } catch (Throwable ex) { 51 | e.getPlayer().sendMessage(Mensagens.Spawner_Bugado); 52 | } 53 | } 54 | } 55 | 56 | } -------------------------------------------------------------------------------- /src/rush/apis/ActionBarAPI.java: -------------------------------------------------------------------------------- 1 | package rush.apis; 2 | 3 | import java.lang.reflect.Constructor; 4 | import java.lang.reflect.Method; 5 | 6 | import org.bukkit.Bukkit; 7 | import org.bukkit.entity.Player; 8 | 9 | import rush.Main; 10 | import rush.enums.Version; 11 | import rush.utils.ReflectionUtils; 12 | 13 | public class ActionBarAPI { 14 | 15 | private static Method a; 16 | private static Object typeMessage; 17 | private static Constructor chatConstructor; 18 | 19 | public static void sendActionBar(Player player, String message) { 20 | try { 21 | Object chatMessage = a.invoke(null, "{\"text\":\"" + message + "\"}"); 22 | Object packet = chatConstructor.newInstance(chatMessage, typeMessage); 23 | ReflectionUtils.sendPacket(player, packet); 24 | } catch (Throwable e) { 25 | e.printStackTrace(); 26 | } 27 | } 28 | 29 | public static void broadcastActionBar(String message) { 30 | try 31 | { 32 | Object chatMessage = a.invoke(null, "{\"text\":\"" + message + "\"}"); 33 | Object packet = chatConstructor.newInstance(chatMessage, typeMessage); 34 | for (Player player : Bukkit.getOnlinePlayers()) { 35 | ReflectionUtils.sendPacket(player, packet); 36 | } 37 | } catch (Throwable e) { 38 | e.printStackTrace(); 39 | } 40 | } 41 | 42 | static void load() { 43 | try 44 | { 45 | Class typeMessageClass; 46 | Class icbc = ReflectionUtils.getNMSClass("IChatBaseComponent"); 47 | Class ppoc = ReflectionUtils.getNMSClass("PacketPlayOutChat"); 48 | 49 | if (icbc.getDeclaredClasses().length > 0) { 50 | a = icbc.getDeclaredClasses()[0].getMethod("a", String.class); 51 | } else { 52 | a = ReflectionUtils.getNMSClass("ChatSerializer").getMethod("a", String.class); 53 | } 54 | 55 | if (Main.getVersion() == Version.v1_12 || Main.isVeryNewVersion()) { 56 | typeMessageClass = ReflectionUtils.getNMSClass("ChatMessageType"); 57 | typeMessage = typeMessageClass.getEnumConstants()[2]; 58 | } else { 59 | typeMessageClass = byte.class; 60 | typeMessage = (byte) 2; 61 | } 62 | 63 | chatConstructor = ppoc.getConstructor(icbc, typeMessageClass); 64 | } 65 | catch (Throwable e) {} 66 | } 67 | } -------------------------------------------------------------------------------- /src/rush/enums/Version.java: -------------------------------------------------------------------------------- 1 | package rush.enums; 2 | 3 | import org.bukkit.Bukkit; 4 | 5 | import rush.utils.SystemInfo; 6 | 7 | public enum Version { 8 | 9 | v1_21(21), 10 | v1_20(20), 11 | v1_19(19), 12 | v1_18(18), 13 | v1_17 (17), 14 | v1_16_5 (16), 15 | v1_16_4 (16), 16 | v1_16_3 (16), 17 | v1_16_2 (16), 18 | v1_16 (16), 19 | v1_15 (15), 20 | v1_14 (14), 21 | v1_13 (13), 22 | v1_12 (12), 23 | v1_11 (11), 24 | v1_10 (10), 25 | v1_9 (9), 26 | v1_8 (8), 27 | v1_7 (7), 28 | v1_6 (6), 29 | v1_5 (5), 30 | DESCONHECIDA (999); 31 | 32 | public static Version getServerVersion() { 33 | Version version = getServerVersion(SystemInfo.getMinecraftVersion()); 34 | if (version == DESCONHECIDA) { 35 | version = getServerVersion(Bukkit.getVersion()); 36 | } 37 | return version; 38 | } 39 | 40 | private static Version getServerVersion(String ver) { 41 | if (ver.contains("1.21")) 42 | return v1_21; 43 | if (ver.contains("1.20")) 44 | return v1_20; 45 | if (ver.contains("1.19")) 46 | return v1_19; 47 | if (ver.contains("1.18")) 48 | return v1_18; 49 | if (ver.contains("1.17")) 50 | return v1_17; 51 | else if (ver.contains("1.16.5")) 52 | return v1_16_5; 53 | else if (ver.contains("1.16.4")) 54 | return v1_16_4; 55 | else if (ver.contains("1.16.3")) 56 | return v1_16_3; 57 | else if (ver.contains("1.16.2")) 58 | return v1_16_2; 59 | else if (ver.contains("1.16")) 60 | return v1_16; 61 | else if (ver.contains("1.15")) 62 | return v1_15; 63 | else if (ver.contains("1.14")) 64 | return v1_14; 65 | else if (ver.contains("1.13")) 66 | return v1_13; 67 | else if (ver.contains("1.12")) 68 | return v1_12; 69 | else if (ver.contains("1.11")) 70 | return v1_11; 71 | else if (ver.contains("1.10")) 72 | return v1_10; 73 | else if (ver.contains("1.9")) 74 | return v1_9; 75 | else if (ver.contains("1.8")) 76 | return v1_8; 77 | else if (ver.contains("1.7")) 78 | return v1_7; 79 | else if (ver.contains("1.6")) 80 | return v1_6; 81 | else if (ver.contains("1.5")) 82 | return v1_5; 83 | else 84 | return DESCONHECIDA; 85 | } 86 | 87 | public int value; 88 | 89 | Version(int value) { 90 | this.value = value; 91 | } 92 | 93 | } -------------------------------------------------------------------------------- /src/rush/utils/objectStream/BukkitObjectInputStream.java: -------------------------------------------------------------------------------- 1 | package rush.utils.objectStream; 2 | 3 | import java.io.IOException; 4 | import java.io.InputStream; 5 | import java.io.ObjectInputStream; 6 | 7 | import org.bukkit.configuration.serialization.ConfigurationSerializable; 8 | import org.bukkit.configuration.serialization.ConfigurationSerialization; 9 | 10 | /** 11 | * This class is designed to be used in conjunction with the {@link 12 | * ConfigurationSerializable} API. It translates objects back to their 13 | * original implementation after being serialized by {@link 14 | * BukkitObjectInputStream}. 15 | *

16 | * Behavior of implementations extending this class is not guaranteed across 17 | * future versions. 18 | */ 19 | public class BukkitObjectInputStream extends ObjectInputStream { 20 | 21 | /** 22 | * Constructor provided to mirror super functionality. 23 | * 24 | * @throws IOException 25 | * @throws SecurityException 26 | * @see ObjectInputStream#ObjectInputStream() 27 | */ 28 | protected BukkitObjectInputStream() throws IOException, SecurityException { 29 | super(); 30 | super.enableResolveObject(true); 31 | } 32 | 33 | /** 34 | * Object input stream decoration constructor. 35 | * 36 | * @param in 37 | * @throws IOException 38 | * @see ObjectInputStream#ObjectInputStream(InputStream) 39 | */ 40 | public BukkitObjectInputStream(InputStream in) throws IOException { 41 | super(in); 42 | super.enableResolveObject(true); 43 | } 44 | 45 | @Override 46 | protected Object resolveObject(Object obj) throws IOException { 47 | if (obj instanceof Wrapper) { 48 | try { 49 | (obj = ConfigurationSerialization.deserializeObject(((Wrapper) obj).map)).getClass(); // NPE 50 | } catch (Throwable ex) { 51 | throw newIOException("Failed to deserialize object", ex); 52 | } 53 | } 54 | 55 | return super.resolveObject(obj); 56 | } 57 | 58 | private static IOException newIOException(String string, Throwable cause) { 59 | IOException exception = new IOException(string); 60 | exception.initCause(cause); 61 | return exception; 62 | } 63 | 64 | } -------------------------------------------------------------------------------- /src/rush/utils/Backup.java: -------------------------------------------------------------------------------- 1 | package rush.utils; 2 | 3 | import java.io.File; 4 | import java.io.FileInputStream; 5 | import java.io.FileOutputStream; 6 | import java.text.DateFormat; 7 | import java.util.Calendar; 8 | import java.util.Date; 9 | import java.util.zip.ZipEntry; 10 | import java.util.zip.ZipOutputStream; 11 | 12 | import rush.Main; 13 | import rush.utils.manager.DataManager; 14 | 15 | public class Backup { 16 | 17 | public static void create() { 18 | try { 19 | DataManager.createFolder("backups"); 20 | Date d = Calendar.getInstance().getTime(); 21 | String data = DateFormat.getDateTimeInstance(2, 3).format(d).replace('/', '-').replace(':', ';'); 22 | String nome = "Dia " + data.split(" ")[0] + " Hora " + data.split(" ")[1]; 23 | String srcFolder = Main.get().getDataFolder().getAbsolutePath(); 24 | String destZipFile = DataManager.getFile(nome, "backups").getAbsolutePath().replace(".yml", ".zip"); 25 | zipFolder(srcFolder, destZipFile); 26 | } catch (Throwable e) { 27 | e.printStackTrace(); 28 | } 29 | } 30 | 31 | private static void zipFolder(String srcFolder, String destZipFile) throws Exception { 32 | FileOutputStream fileWriter = new FileOutputStream(destZipFile); 33 | ZipOutputStream zip = new ZipOutputStream(fileWriter); 34 | addFolderToZip("", srcFolder, zip); 35 | zip.flush(); 36 | zip.close(); 37 | } 38 | 39 | private static void addFileToZip(String path, String srcFile, ZipOutputStream zip) throws Exception { 40 | File folder = new File(srcFile); 41 | if (folder.isDirectory()) { 42 | addFolderToZip(path, srcFile, zip); 43 | } else { 44 | byte[] buf = new byte[1024]; 45 | int len; 46 | FileInputStream in = new FileInputStream(srcFile); 47 | zip.putNextEntry(new ZipEntry(path + "/" + folder.getName())); 48 | while ((len = in.read(buf)) > 0) { 49 | zip.write(buf, 0, len); 50 | } 51 | in.close(); 52 | } 53 | } 54 | 55 | private static void addFolderToZip(String path, String srcFolder, ZipOutputStream zip) throws Exception { 56 | File folder = new File(srcFolder); 57 | if (folder.getName().equals("backups")) return; 58 | for (String fileName : folder.list()) { 59 | if (path.equals("")) { 60 | addFileToZip(folder.getName(), srcFolder + "/" + fileName, zip); 61 | } else { 62 | addFileToZip(path + "/" + folder.getName(), srcFolder + "/" + fileName, zip); 63 | } 64 | } 65 | } 66 | 67 | } -------------------------------------------------------------------------------- /src/rush/apis/ViewDistanceAPI.java: -------------------------------------------------------------------------------- 1 | package rush.apis; 2 | 3 | import java.lang.reflect.Field; 4 | import java.lang.reflect.Method; 5 | 6 | import org.bukkit.entity.Player; 7 | 8 | import rush.Main; 9 | import rush.enums.Version; 10 | import rush.utils.ReflectionUtils; 11 | 12 | public class ViewDistanceAPI { 13 | 14 | private static Class worldServerClass; 15 | private static Method getPlayerChunkMap; 16 | private static Method updateViewDistance; 17 | private static Method getHandle; 18 | private static Field worldField; 19 | private static Field distanceField; 20 | 21 | public static int getViewDistance(Player player) { 22 | try { 23 | Object entityPlayer = getHandle.invoke(player); 24 | Object world = worldField.get(entityPlayer); 25 | Object worldServer = worldServerClass.cast(world); 26 | Object playerChunkMap = getPlayerChunkMap.invoke(worldServer); 27 | return (int) distanceField.get(playerChunkMap); 28 | } catch (Throwable e) { 29 | return -1; 30 | } 31 | } 32 | 33 | public static void setViewDistance(Player player, int viewDistance) { 34 | try { 35 | Object entityPlayer = getHandle.invoke(player); 36 | Object world = worldField.get(entityPlayer); 37 | Object worldServer = worldServerClass.cast(world); 38 | Object playerChunkMap = getPlayerChunkMap.invoke(worldServer); 39 | updateViewDistance.invoke(playerChunkMap, viewDistance); 40 | } catch (Throwable e) { 41 | e.printStackTrace(); 42 | } 43 | } 44 | 45 | static void load() { 46 | try 47 | { 48 | Class craftPlayerClass = ReflectionUtils.getOBClass("entity.CraftPlayer"); 49 | Class playerChunkMapClass = ReflectionUtils.getNMSClass("PlayerChunkMap"); 50 | Class entityPlayerClass = ReflectionUtils.getNMSClass("EntityPlayer"); 51 | 52 | worldField = entityPlayerClass.getField("world"); 53 | getHandle = craftPlayerClass.getMethod("getHandle"); 54 | worldServerClass = ReflectionUtils.getNMSClass("WorldServer"); 55 | getPlayerChunkMap = worldServerClass.getMethod("getPlayerChunkMap"); 56 | updateViewDistance = playerChunkMapClass.getMethod("a", int.class); 57 | 58 | String fieldName; 59 | if (Main.getVersion() == Version.v1_8) { 60 | fieldName = "g"; 61 | } else { 62 | fieldName = "j"; 63 | } 64 | 65 | distanceField = playerChunkMapClass.getDeclaredField(fieldName); 66 | distanceField.setAccessible(true); 67 | } 68 | catch (Throwable e) {} 69 | } 70 | } -------------------------------------------------------------------------------- /src/rush/entidades/Warps.java: -------------------------------------------------------------------------------- 1 | package rush.entidades; 2 | 3 | import java.io.File; 4 | import java.util.Collection; 5 | import java.util.HashMap; 6 | 7 | import org.bukkit.configuration.file.FileConfiguration; 8 | 9 | import rush.utils.manager.DataManager; 10 | 11 | public abstract class Warps { 12 | 13 | private static HashMap WARPS = new HashMap<>(); 14 | 15 | public static Warp get(String warp) { 16 | return WARPS.get(warp); 17 | } 18 | 19 | public static Collection getAll() { 20 | return WARPS.values(); 21 | } 22 | 23 | public static void create(String nome, Warp warp) { 24 | WARPS.put(nome, warp); 25 | } 26 | 27 | public static void delete(String nome) { 28 | File file = DataManager.getFile(nome, "warps"); 29 | DataManager.deleteFile(file); 30 | WARPS.remove(nome); 31 | } 32 | 33 | public static boolean contains(String nome) { 34 | return WARPS.containsKey(nome); 35 | } 36 | 37 | public static void loadWarps() { 38 | WARPS.clear(); 39 | File folder = DataManager.getFolder("warps"); 40 | File[] file = folder.listFiles(); 41 | if(file != null) { 42 | for (int i = 0; i < file.length; i++) { 43 | if (file[i] != null && file[i].isFile()) { 44 | FileConfiguration configWarp = DataManager.getConfiguration(file[i]); 45 | String nome = file[i].getName().replace(".yml", ""); 46 | String loc = configWarp.getString("Localizacao"); 47 | String perm = configWarp.getString("Permissao", ""); 48 | String semPerm = configWarp.getString("MensagemSemPermissao", ""); 49 | int delay = configWarp.getInt("Delay"); 50 | boolean delayVip = configWarp.getBoolean("DelayParaVips"); 51 | boolean mensagem = configWarp.getBoolean("EnviarMensagem", true); 52 | String inicio = configWarp.getString("MensagemInicio", ""); 53 | String fim = configWarp.getString("MensagemFinal", ""); 54 | boolean enviar = configWarp.getBoolean("EnviarTitle"); 55 | String title = configWarp.getString("Title", ""); 56 | String subTitle = configWarp.getString("SubTitle", ""); 57 | String teleportado = configWarp.getString("MensagemPlayerTeleportado", ""); 58 | String teleportadoStaff = configWarp.getString("MensagemPlayerTeleportadoStaff", ""); 59 | Warp warp = new Warp(nome, loc, perm, semPerm, delay, delayVip, mensagem, inicio, fim, enviar, title, subTitle, teleportado, teleportadoStaff); 60 | WARPS.put(nome, warp); 61 | } 62 | } 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/rush/sistemas/gerais/DeletarComandos.java: -------------------------------------------------------------------------------- 1 | package rush.sistemas.gerais; 2 | 3 | import java.lang.reflect.Field; 4 | import java.util.HashSet; 5 | import java.util.Map; 6 | import java.util.Map.Entry; 7 | import java.util.Set; 8 | 9 | import org.bukkit.Bukkit; 10 | import org.bukkit.command.Command; 11 | import org.bukkit.command.CommandMap; 12 | import org.bukkit.command.SimpleCommandMap; 13 | import org.bukkit.scheduler.BukkitRunnable; 14 | 15 | import rush.Main; 16 | import rush.configuracoes.Settings; 17 | 18 | public class DeletarComandos { 19 | 20 | @SuppressWarnings("unchecked") 21 | public static void deleteCommands() { 22 | new BukkitRunnable() { 23 | 24 | @Override 25 | public void run() { 26 | try 27 | { 28 | Field commandMapField = Bukkit.getPluginManager().getClass().getDeclaredField("commandMap"); 29 | Field commandsField = SimpleCommandMap.class.getDeclaredField("knownCommands"); 30 | commandMapField.setAccessible(true); 31 | commandsField.setAccessible(true); 32 | 33 | CommandMap commandMap = (CommandMap) commandMapField.get(Bukkit.getPluginManager()); 34 | Map commands = (Map) commandsField.get(commandMap); 35 | Set> removes = new HashSet<>(); 36 | 37 | for (String line : Settings.Lista_Dos_Comandos_Deletados) 38 | { 39 | String plugin = line.split(":")[0].toLowerCase().trim(); 40 | String command = line.split(":")[1].toLowerCase().trim(); 41 | 42 | if (command.equals("*")) { 43 | for (Entry entry : commands.entrySet()) { 44 | if (entry.getKey().contains(":") && entry.getKey().toLowerCase().split(":")[0].equals(plugin)) { 45 | removes.add(entry); 46 | } 47 | } 48 | } 49 | 50 | else if (plugin.equals("*")) { 51 | for (Entry entry : commands.entrySet()) { 52 | if (entry.getValue().getName().toLowerCase().equals(command) || (entry.getKey().split(":").length > 1 && entry.getKey().toLowerCase().split(":")[1].equals(command))) { 53 | removes.add(entry); 54 | } 55 | } 56 | } 57 | 58 | else { 59 | for (Entry entry : commands.entrySet()) { 60 | if (entry.getKey().split(":").length > 1 && entry.getKey().toLowerCase().split(":")[0].equals(plugin) && (entry.getValue().getName().toLowerCase().equals(command) || entry.getKey().toLowerCase().split(":")[1].equals(command) )) { 61 | removes.add(entry); 62 | } 63 | } 64 | } 65 | } 66 | 67 | for (Entry entry : removes) { 68 | entry.getValue().unregister(commandMap); 69 | commands.remove(entry.getKey(), entry.getValue()); 70 | } 71 | 72 | } 73 | catch (Throwable e) { 74 | e.printStackTrace(); 75 | } 76 | } 77 | }.runTaskLaterAsynchronously(Main.get(), 20L * 15L); 78 | 79 | } 80 | 81 | } 82 | -------------------------------------------------------------------------------- /src/rush/utils/ReflectionUtils.java: -------------------------------------------------------------------------------- 1 | package rush.utils; 2 | 3 | import java.io.File; 4 | import java.lang.reflect.Field; 5 | import java.lang.reflect.Method; 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | 9 | import org.bukkit.Bukkit; 10 | import org.bukkit.entity.Player; 11 | 12 | import rush.Main; 13 | 14 | /** 15 | * @author Mior 16 | * @version 1.0 17 | * @category utils 18 | */ 19 | 20 | public class ReflectionUtils { 21 | 22 | private static final String version = Bukkit.getServer().getClass().getPackage().getName().split("\\.")[3]; 23 | private static Method getHandle; 24 | private static Method sendPacket; 25 | private static Field playerConnectionField; 26 | 27 | public static void loadUtils() { 28 | try 29 | { 30 | getHandle = getOBClass("entity.CraftPlayer").getMethod("getHandle"); 31 | playerConnectionField = getNMSClass("EntityPlayer").getField("playerConnection"); 32 | sendPacket = getNMSClass("PlayerConnection").getMethod("sendPacket", getNMSClass("Packet")); 33 | } 34 | catch (Throwable e) {} 35 | } 36 | 37 | public static Class getNMSClass(String name) throws ClassNotFoundException { 38 | return Class.forName("net.minecraft.server." + version + "." + name); 39 | } 40 | 41 | public static Class getOBClass(String name) throws ClassNotFoundException { 42 | return Class.forName("org.bukkit.craftbukkit." + version + "." + name); 43 | } 44 | 45 | public static void sendPacket(Player player, Object packet) { 46 | try { 47 | 48 | if (Main.getVersion().value < 17) { 49 | Object entityPlayer = getHandle.invoke(player); 50 | Object playerConnection = playerConnectionField.get(entityPlayer); 51 | sendPacket.invoke(playerConnection, packet); 52 | } else { 53 | Object handle = player.getClass().getMethod("getHandle").invoke(player); 54 | Object playerConnection = handle.getClass().getField("b").get(handle); 55 | Class packetClass = Class.forName("net.minecraft.network.protocol.Packet"); 56 | playerConnection.getClass().getMethod("sendPacket", packetClass).invoke(playerConnection, packet); 57 | } 58 | 59 | } catch (Throwable e) { 60 | e.printStackTrace(); 61 | } 62 | } 63 | 64 | public static List> getProjectClasses(String pckg) { 65 | try { 66 | List> classes = new ArrayList<>(); 67 | File directory = new File(Thread.currentThread().getContextClassLoader().getResource(pckg).getFile()); 68 | for (File file : directory.listFiles()) { 69 | if (file.getName().endsWith(".class")) { 70 | classes.add(Class.forName(pckg.replace('/', '.') + '.' + file.getName().replace(".class", ""))); 71 | } else { 72 | if (file.isDirectory()) { 73 | classes.addAll(getProjectClasses(pckg + "/" + file.getName())); 74 | } 75 | } 76 | } 77 | return classes; 78 | } catch (Throwable e) { 79 | return null; 80 | } 81 | } 82 | 83 | } -------------------------------------------------------------------------------- /src/rush/utils/serializer/SerializerOLD.java: -------------------------------------------------------------------------------- 1 | package rush.utils.serializer; 2 | 3 | import java.io.ByteArrayInputStream; 4 | import java.io.ByteArrayOutputStream; 5 | 6 | import org.bukkit.inventory.ItemStack; 7 | import org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder; 8 | 9 | import rush.utils.objectStream.BukkitObjectInputStream; 10 | import rush.utils.objectStream.BukkitObjectOutputStream; 11 | 12 | public class SerializerOLD { 13 | 14 | public static ItemStack deserializeItemStack(String data) { 15 | try { 16 | ByteArrayInputStream inputStream = new ByteArrayInputStream(Base64Coder.decodeLines(data)); 17 | BukkitObjectInputStream dataInput = new BukkitObjectInputStream(inputStream); 18 | dataInput.readInt(); 19 | ItemStack item = (ItemStack) dataInput.readObject(); 20 | 21 | dataInput.close(); 22 | return item; 23 | } catch (Throwable e) { 24 | e.printStackTrace(); 25 | } 26 | return null; 27 | } 28 | 29 | public static ItemStack[] deserializeListItemStack(String data) { 30 | try { 31 | ByteArrayInputStream inputStream = new ByteArrayInputStream(Base64Coder.decodeLines(data)); 32 | BukkitObjectInputStream dataInput = new BukkitObjectInputStream(inputStream); 33 | ItemStack[] items = new ItemStack[dataInput.readInt()]; 34 | 35 | for (int i = 0; i < items.length; i++) { 36 | items[i] = (ItemStack) dataInput.readObject(); 37 | } 38 | 39 | dataInput.close(); 40 | return items; 41 | } catch (Throwable e) { 42 | e.printStackTrace(); 43 | } 44 | return null; 45 | } 46 | 47 | public static String serializeItemStack(ItemStack item) { 48 | try { 49 | ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); 50 | BukkitObjectOutputStream dataOutput = new BukkitObjectOutputStream(outputStream); 51 | 52 | dataOutput.writeInt(1); 53 | 54 | dataOutput.writeObject(item); 55 | 56 | dataOutput.close(); 57 | return Base64Coder.encodeLines(outputStream.toByteArray()); 58 | } catch (Throwable e) { 59 | e.printStackTrace(); 60 | } 61 | return null; 62 | } 63 | 64 | public static String serializeListItemStack(ItemStack[] items) { 65 | try { 66 | ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); 67 | BukkitObjectOutputStream dataOutput = new BukkitObjectOutputStream(outputStream); 68 | 69 | dataOutput.writeInt(items.length); 70 | 71 | for (int i = 0; i < items.length; i++) { 72 | dataOutput.writeObject(items[i]); 73 | } 74 | 75 | dataOutput.close(); 76 | return Base64Coder.encodeLines(outputStream.toByteArray()); 77 | } catch (Throwable e) { 78 | e.printStackTrace(); 79 | } 80 | return null; 81 | } 82 | 83 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # System 2 | 3 | Este sistema foi originalmente criado por RUSHyotuber com o intuito de ajudar muitos servidores e facilitar a vida das pessoas. Ao longo do tempo varios contribuintes foram ajudando para a otimização e o aprimoramento projeto. 4 | 5 | Pessoas que contribuiram com o projeto [AnonyDev, LeoDev, Wolf_131, leonardosc, TequilAxBr, zAth, Jota, KickPost, gcunha, Gutyerrez, AlexHackers, BigWriter, Hard, Alomax, Joao Seidel, Pica-Pau, codename_G, Shisui, Kaway, Jamp, dargoh, aureom, VitorBlog, NatanDev, Duck, DvH, MarcioRUSH] 6 | 7 | Link do plugin no Spigot: https://www.spigotmc.org/resources/system.102876/ 8 | 9 | Link do plugin na GamersBoard: https://gamersboard.com.br/topic/61255-system-o-seu-novo-super-essentials 10 | 11 | # Atenção Importante 12 | No dia 23 de junho de 2022 foi lançada a versão `1.14.19` do System. A partir deste dia em diante o plugin não receberá mais atualizações. 13 | 14 | Atualmente a ultima versão `1.14.19` do plugin está **100% estável** e **não possui nenhum Bug**! 15 | 16 | A versão dá suporte completo desde o Minecraft **1.5** até o Minecraft **1.19** e também possui um pré-suporte para as versões 1.20 e 1.21 do Minecraft. 17 | 18 | Importante lembrar: o plugin não esta "morto", ele funciona perfeitamente e não possui nenhum problema, ele só não recebe mais atualizações. 19 | 20 | # Agradecimentos 21 | Gostaria de agrader a todas as pessoas que já colaboraram no System, tanto dando sugestões quanto ajudando com códigos ou ajudando a testar o plugin, em fim, gostaria de agradecer a todos que me ajudaram a evoluir como programador e ajudar o plugin a evoluir e se tornar o **plugin brasileiro mais usado**! 22 | 23 | Foram mais de 5 anos trabalhando no System e eu tenho muito orgulho de tudo que foi feito e de tudo que foi criado, muito obrigado a todos! 24 | 25 | ### Você gostaria de dar continuidade no System? 26 | Atualmente o System não possui nenhum desenvolvedor ativo dando continuidade no Projeto, caso você queira dar continuidade no projeto basta aprir um PullRequest ou entrar em contato comigo. 27 | 28 | ### Oque ainda precisaria ser feito no System? 29 | Lista das coisas que ainda precisariam ser feitas no System para melhorar ainda mais o plugin. 30 | - [ ] Adicionar suporte ao sistema de Kits para a versão 1.17 e versões acima da 1.17. 31 | - [ ] Adicionar suporte a cores RGB nas novas versões do minecraft. 32 | - [ ] Adicionar suporte ao comando /bigorna e a funcionalidade bigorna infinita nas versões acima da 1.13. 33 | - [ ] Melhorar o comando /compactar e /derreter para serem compatíveis com os novos minérios das novas versões do minecraft. 34 | - [ ] Melhorar o comando /estatisticas e /verinfo para mostrar informações novas disponíveis nas novas versões do minecraft. 35 | - [ ] Estudar as versões do minecraft desde a 1.13 para identificar novos recursos e funcionalidades interessantes que poderiam ser adicionados no plugin. 36 | - [ ] Analisar as novas necessidades dos servidores modernos do minecraft para entender oque eles estão precisando e adicionar novos recursos e funcionalidades utis no plugin, a ultima vez que esse estudo foi feito foi em 2018. 37 | - [ ] Analisar o Timmings de servidores grandes que usam o System para identificar melhorias que possam ser feitas no código para deixa-lo mais otimizado. 38 | -------------------------------------------------------------------------------- /src/rush/entidades/Kit.java: -------------------------------------------------------------------------------- 1 | package rush.entidades; 2 | 3 | import org.bukkit.inventory.ItemStack; 4 | 5 | import rush.Main; 6 | import rush.utils.serializer.Serializer; 7 | import rush.utils.serializer.SerializerNEW; 8 | import rush.utils.serializer.SerializerVeryNEW; 9 | import rush.utils.serializer.SerializerOLD; 10 | 11 | public class Kit { 12 | 13 | private String id; 14 | private String nome; 15 | private String permissao; 16 | private long delay; 17 | private String mensagemDeErro; 18 | private ItemStack[] itens; 19 | private int amountItens; 20 | 21 | public Kit(String id, String permissao, String nome, long delay, String mensagemDeErro, String itens) { 22 | ItemStack[] itensStack = getItensByData(itens); 23 | this.id = id; 24 | this.permissao = permissao; 25 | this.nome = nome; 26 | this.delay = delay; 27 | this.mensagemDeErro = mensagemDeErro; 28 | this.itens = itensStack; 29 | this.amountItens = calcule(itensStack); 30 | } 31 | 32 | public String getId() { 33 | return id; 34 | } 35 | 36 | public void setId(String kit) { 37 | this.id = kit; 38 | } 39 | 40 | public String getNome() { 41 | return nome; 42 | } 43 | 44 | public void setNome(String nome) { 45 | this.nome = nome; 46 | } 47 | 48 | public String getPermissao() { 49 | return permissao; 50 | } 51 | 52 | public void setPermissao(String permissao) { 53 | this.permissao = permissao; 54 | } 55 | 56 | public long getDelay() { 57 | return delay; 58 | } 59 | 60 | public void setDelay(long delay) { 61 | this.delay = delay; 62 | } 63 | 64 | public String getMensagemDeErro() { 65 | return mensagemDeErro; 66 | } 67 | 68 | public void setMensagemDeErro(String mensagemDeErro) { 69 | this.mensagemDeErro = mensagemDeErro; 70 | } 71 | 72 | public ItemStack[] getItens() { 73 | return itens; 74 | } 75 | 76 | public void setItens(ItemStack[] itens) { 77 | this.itens = itens; 78 | this.amountItens = calcule(itens); 79 | } 80 | 81 | public int getAmountItens() { 82 | return amountItens; 83 | } 84 | 85 | private int calcule(ItemStack[] itens) { 86 | int amount = 0; 87 | for (ItemStack item : itens) { 88 | if (item != null) amount++; 89 | } 90 | return amount; 91 | } 92 | 93 | private ItemStack[] getItensByData(String data) { 94 | if (Main.isOldVersion()) 95 | { 96 | return SerializerOLD.deserializeListItemStack(data); 97 | } 98 | else if (Main.isMotherFuckerVersion()) 99 | { 100 | return SerializerVeryNEW.deserializeListItemStack(data); 101 | } 102 | else if (Main.isNewVersion()) 103 | { 104 | return SerializerNEW.deserializeListItemStack(data); 105 | } 106 | else 107 | { 108 | return Serializer.deserializeListItemStack(data); 109 | } 110 | } 111 | 112 | @Override 113 | public String toString() { 114 | return nome; 115 | } 116 | 117 | @Override 118 | public int hashCode() { 119 | final int prime = 31; 120 | int result = 1; 121 | result = prime * result + ((id == null) ? 0 : id.hashCode()); 122 | return result; 123 | } 124 | 125 | @Override 126 | public boolean equals(Object obj) { 127 | if (this == obj) 128 | return true; 129 | if (obj == null) 130 | return false; 131 | if (getClass() != obj.getClass()) 132 | return false; 133 | Kit other = (Kit) obj; 134 | if (id == null) { 135 | if (other.id != null) 136 | return false; 137 | } else if (!id.equals(other.id)) 138 | return false; 139 | return true; 140 | } 141 | } 142 | -------------------------------------------------------------------------------- /src/rush/sistemas/gerais/StackMobs.java: -------------------------------------------------------------------------------- 1 | package rush.sistemas.gerais; 2 | 3 | import java.util.List; 4 | 5 | import org.bukkit.entity.Entity; 6 | import org.bukkit.entity.EntityType; 7 | import org.bukkit.entity.LivingEntity; 8 | import org.bukkit.event.EventHandler; 9 | import org.bukkit.event.EventPriority; 10 | import org.bukkit.event.Listener; 11 | import org.bukkit.event.entity.CreatureSpawnEvent; 12 | import org.bukkit.event.entity.EntityDeathEvent; 13 | import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; 14 | import org.bukkit.inventory.ItemStack; 15 | import org.bukkit.metadata.FixedMetadataValue; 16 | 17 | import rush.Main; 18 | import rush.configuracoes.Settings; 19 | import rush.enums.EntityName; 20 | 21 | public class StackMobs implements Listener { 22 | 23 | private static int MAX_STACK = Settings.Limite_De_Mobs_Agrupados; 24 | private static String NAME = Settings.Nome_Dos_Mobs; 25 | private static boolean KILL_ALL = Settings.Kill_All; 26 | private static double RANGE = Settings.Raio_De_Distancia; 27 | private static List WHITE_LIST = Settings.Lista_De_Mobs_Que_Nao_Agrupam; 28 | 29 | @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGH) 30 | public void onSpawn(CreatureSpawnEvent e) { 31 | 32 | LivingEntity spawned = e.getEntity(); 33 | boolean stack = spawned.hasMetadata("stack"); 34 | SpawnReason reason = e.getSpawnReason(); 35 | EntityType spawnedType = e.getEntityType(); 36 | 37 | if ((reason == SpawnReason.EGG) || (reason == SpawnReason.CUSTOM && !stack) || (WHITE_LIST.contains(spawnedType))) return; 38 | 39 | 40 | for (Entity entity : spawned.getNearbyEntities(RANGE, RANGE, RANGE)) { 41 | if (entity.getType() == spawnedType && !entity.isDead()) { 42 | e.setCancelled(true); 43 | int amount = 1; 44 | LivingEntity living = (LivingEntity) entity; 45 | 46 | if (entity.hasMetadata("stack")) 47 | amount += entity.getMetadata("stack").isEmpty() ? 0 : entity.getMetadata("stack").get(0).asInt(); 48 | 49 | if (stack) 50 | amount += living.getMetadata("stack").isEmpty() ? 0 : living.getMetadata("stack").get(0).asInt(); 51 | 52 | if (amount > MAX_STACK) { 53 | e.setCancelled(true); 54 | return; 55 | } 56 | 57 | String type = EntityName.valueOf(e.getEntityType()).getName(); 58 | living.setCustomName(NAME.replace("%tipo%", type).replace("%quantia%", String.valueOf(amount))); 59 | living.setCustomNameVisible(true); 60 | living.setMetadata("stack", new FixedMetadataValue(Main.get(), amount)); 61 | return; 62 | } 63 | } 64 | 65 | if (!spawned.hasMetadata("stack")) { 66 | String type = EntityName.valueOf(e.getEntityType()).getName(); 67 | spawned.setCustomName(NAME.replace("%tipo%", type).replace("%quantia%", String.valueOf(1))); 68 | spawned.setCustomNameVisible(true); 69 | spawned.setMetadata("stack", new FixedMetadataValue(Main.get(), 1)); 70 | } 71 | } 72 | 73 | @EventHandler(priority = EventPriority.MONITOR) 74 | public void onDeath(EntityDeathEvent e) { 75 | LivingEntity entity = e.getEntity(); 76 | if (entity.hasMetadata("stack")) { 77 | int cont = entity.getMetadata("stack").isEmpty() ? 0 : entity.getMetadata("stack").get(0).asInt(); 78 | if (cont > 1) { 79 | if (KILL_ALL && entity.getKiller() != null && !entity.getKiller().isSneaking()) { 80 | e.setDroppedExp(e.getDroppedExp() * cont); 81 | for (ItemStack drop : e.getDrops()) { 82 | if (drop.getType().getMaxDurability() == 0) { 83 | drop.setAmount(drop.getAmount() * cont); 84 | } 85 | } 86 | } else { 87 | String type = EntityName.valueOf(e.getEntityType()).getName(); 88 | LivingEntity spawned = (LivingEntity) entity.getWorld().spawnEntity(entity.getLocation(), e.getEntityType()); 89 | spawned.setCustomName(NAME.replace("%tipo%", type).replace("%quantia%", String.valueOf(--cont))); 90 | spawned.setCustomNameVisible(true); 91 | spawned.setMetadata("stack", new FixedMetadataValue(Main.get(), cont)); 92 | } 93 | } 94 | } 95 | } 96 | 97 | } -------------------------------------------------------------------------------- /src/rush/apis/TitleAPI.java: -------------------------------------------------------------------------------- 1 | package rush.apis; 2 | 3 | import java.lang.reflect.Constructor; 4 | import java.lang.reflect.Method; 5 | 6 | import org.bukkit.Bukkit; 7 | import org.bukkit.entity.Player; 8 | 9 | import rush.Main; 10 | import rush.utils.ReflectionUtils; 11 | 12 | public class TitleAPI { 13 | 14 | private static Method a; 15 | private static Object enumTIMES; 16 | private static Object enumTITLE; 17 | private static Object enumSUBTITLE; 18 | private static Constructor timeTitleConstructor; 19 | private static Constructor textTitleConstructor; 20 | 21 | public static void sendTitle(Player player, Integer fadeIn, Integer stay, Integer fadeOut, String title, String subtitle) { 22 | try { 23 | 24 | if (Main.getVersion().value < 17) { 25 | 26 | Object chatTitle = a.invoke(null, "{\"text\":\"" + title + "\"}"); 27 | Object chatSubtitle = a.invoke(null,"{\"text\":\"" + subtitle + "\"}"); 28 | 29 | Object timeTitlePacket = timeTitleConstructor.newInstance(enumTIMES, null, fadeIn, stay, fadeOut); 30 | Object titlePacket = textTitleConstructor.newInstance(enumTITLE, chatTitle); 31 | Object subtitlePacket = textTitleConstructor.newInstance(enumSUBTITLE, chatSubtitle); 32 | 33 | ReflectionUtils.sendPacket(player, timeTitlePacket); 34 | ReflectionUtils.sendPacket(player, titlePacket); 35 | ReflectionUtils.sendPacket(player, subtitlePacket); 36 | 37 | } else { 38 | 39 | Class playerClass = player.getClass(); 40 | Method sendTitle = playerClass.getMethod("sendTitle", String.class, String.class, int.class, int.class, int.class); 41 | sendTitle.invoke(player, title, subtitle, fadeIn, stay, fadeOut); 42 | 43 | } 44 | 45 | } catch (Throwable e) { 46 | e.printStackTrace(); 47 | } 48 | } 49 | 50 | public static void broadcastTitle(Integer fadeIn, Integer stay, Integer fadeOut, String title, String subtitle) { 51 | try 52 | { 53 | 54 | if (Main.getVersion().value < 17) { 55 | Object chatTitle = a.invoke(null, "{\"text\":\"" + title + "\"}"); 56 | Object chatSubtitle = a.invoke(null,"{\"text\":\"" + subtitle + "\"}"); 57 | 58 | Object timeTitlePacket = timeTitleConstructor.newInstance(enumTIMES, null, fadeIn, stay, fadeOut); 59 | Object titlePacket = textTitleConstructor.newInstance(enumTITLE, chatTitle); 60 | Object subtitlePacket = textTitleConstructor.newInstance(enumSUBTITLE, chatSubtitle); 61 | 62 | for (Player player : Bukkit.getOnlinePlayers()) { 63 | ReflectionUtils.sendPacket(player, timeTitlePacket); 64 | ReflectionUtils.sendPacket(player, titlePacket); 65 | ReflectionUtils.sendPacket(player, subtitlePacket); 66 | } 67 | 68 | } else { 69 | 70 | for (Player player : Bukkit.getOnlinePlayers()) { 71 | Class playerClass = player.getClass(); 72 | Method sendTitle = playerClass.getMethod("sendTitle", String.class, String.class, int.class, int.class, int.class); 73 | sendTitle.invoke(player, title, subtitle, fadeIn, stay, fadeOut); 74 | } 75 | 76 | } 77 | 78 | } 79 | catch (Throwable e) { 80 | e.printStackTrace(); 81 | } 82 | } 83 | 84 | static void load() { 85 | try 86 | { 87 | if (Main.getVersion().value < 17) { 88 | Class icbc = ReflectionUtils.getNMSClass("IChatBaseComponent"); 89 | Class ppot = ReflectionUtils.getNMSClass("PacketPlayOutTitle"); 90 | Class enumClass; 91 | 92 | if (ppot.getDeclaredClasses().length > 0) { 93 | enumClass = ppot.getDeclaredClasses()[0]; 94 | } else { 95 | enumClass = ReflectionUtils.getNMSClass("EnumTitleAction"); 96 | } 97 | 98 | if (icbc.getDeclaredClasses().length > 0) { 99 | a = icbc.getDeclaredClasses()[0].getMethod("a", String.class); 100 | } else { 101 | a = ReflectionUtils.getNMSClass("ChatSerializer").getMethod("a", String.class); 102 | } 103 | 104 | enumTIMES = enumClass.getField("TIMES").get(null); 105 | enumTITLE = enumClass.getField("TITLE").get(null); 106 | enumSUBTITLE = enumClass.getField("SUBTITLE").get(null); 107 | timeTitleConstructor = ppot.getConstructor(enumClass, icbc, int.class, int.class, int.class); 108 | textTitleConstructor = ppot.getConstructor(enumClass, icbc); 109 | } 110 | } 111 | catch (Throwable e) {} 112 | } 113 | } -------------------------------------------------------------------------------- /src/rush/utils/serializer/Serializer.java: -------------------------------------------------------------------------------- 1 | package rush.utils.serializer; 2 | 3 | import java.io.ByteArrayInputStream; 4 | import java.io.ByteArrayOutputStream; 5 | import java.io.DataInputStream; 6 | import java.io.DataOutput; 7 | import java.io.DataOutputStream; 8 | import java.lang.reflect.Constructor; 9 | import java.math.BigInteger; 10 | 11 | import org.bukkit.Material; 12 | import org.bukkit.inventory.ItemStack; 13 | import org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder; 14 | 15 | import rush.utils.ReflectionUtils; 16 | import rush.utils.objectStream.BukkitObjectInputStream; 17 | import rush.utils.objectStream.BukkitObjectOutputStream; 18 | 19 | public class Serializer { 20 | 21 | public static ItemStack deserializeItemStack(String data) { 22 | ByteArrayInputStream inputStream = new ByteArrayInputStream(new BigInteger(data, 32).toByteArray()); 23 | DataInputStream dataInputStream = new DataInputStream(inputStream); 24 | 25 | ItemStack itemStack = null; 26 | try { 27 | Class nbtTagCompoundClass = ReflectionUtils.getNMSClass("NBTTagCompound"); 28 | Class nmsItemStackClass = ReflectionUtils.getNMSClass("ItemStack"); 29 | Object nbtTagCompound = ReflectionUtils.getNMSClass("NBTCompressedStreamTools").getMethod("a", DataInputStream.class).invoke(null, dataInputStream); 30 | Object craftItemStack = nmsItemStackClass.getMethod("createStack", nbtTagCompoundClass).invoke(null, nbtTagCompound); 31 | itemStack = (ItemStack) ReflectionUtils.getOBClass("inventory.CraftItemStack").getMethod("asBukkitCopy", nmsItemStackClass).invoke(null, craftItemStack); 32 | } catch (Throwable e) { 33 | e.printStackTrace(); 34 | } 35 | 36 | return itemStack; 37 | } 38 | 39 | public static ItemStack[] deserializeListItemStack(String itens) { 40 | ByteArrayInputStream inputStream = new ByteArrayInputStream(Base64Coder.decodeLines(itens)); 41 | BukkitObjectInputStream dataInput; 42 | 43 | try { 44 | dataInput = new BukkitObjectInputStream(inputStream); 45 | int size = dataInput.readInt(); 46 | ItemStack[] list = new ItemStack[size]; 47 | 48 | for (int i = 0; i < size; i++) { 49 | Object utf = dataInput.readObject(); 50 | int slot = dataInput.readInt(); 51 | if (utf != null) list[slot] = deserializeItemStack((String) utf); 52 | } 53 | 54 | dataInput.close(); 55 | return list; 56 | } catch (Throwable e) { 57 | e.printStackTrace(); 58 | } 59 | 60 | return null; 61 | } 62 | 63 | public static String serializeItemStack(ItemStack item) { 64 | ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); 65 | DataOutputStream dataOutput = new DataOutputStream(outputStream); 66 | 67 | try { 68 | Class nbtTagCompoundClass = ReflectionUtils.getNMSClass("NBTTagCompound"); 69 | Constructor nbtTagCompoundConstructor = nbtTagCompoundClass.getConstructor(); 70 | Object nbtTagCompound = nbtTagCompoundConstructor.newInstance(); 71 | Object nmsItemStack = ReflectionUtils.getOBClass("inventory.CraftItemStack").getMethod("asNMSCopy", ItemStack.class).invoke(null, item); 72 | ReflectionUtils.getNMSClass("ItemStack").getMethod("save", nbtTagCompoundClass).invoke(nmsItemStack, nbtTagCompound); 73 | ReflectionUtils.getNMSClass("NBTCompressedStreamTools").getMethod("a", nbtTagCompoundClass, DataOutput.class).invoke(null, nbtTagCompound, (DataOutput) dataOutput); 74 | } catch (Throwable e) { 75 | e.printStackTrace(); 76 | } 77 | 78 | return new BigInteger(1, outputStream.toByteArray()).toString(32); 79 | } 80 | 81 | public static String serializeListItemStack(ItemStack[] itens) { 82 | ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); 83 | BukkitObjectOutputStream dataOutput; 84 | 85 | try { 86 | dataOutput = new BukkitObjectOutputStream(outputStream); 87 | dataOutput.writeInt(itens.length); 88 | 89 | int index = 0; 90 | for (ItemStack is : itens) { 91 | if (is != null && is.getType() != Material.AIR) { 92 | dataOutput.writeObject(serializeItemStack(is)); 93 | } else { 94 | dataOutput.writeObject(null); 95 | } 96 | dataOutput.writeInt(index); 97 | index++; 98 | } 99 | 100 | dataOutput.close(); 101 | } catch (Throwable e) { 102 | e.printStackTrace(); 103 | } 104 | 105 | return Base64Coder.encodeLines(outputStream.toByteArray()); 106 | } 107 | 108 | } -------------------------------------------------------------------------------- /src/rush/utils/serializer/SerializerNEW.java: -------------------------------------------------------------------------------- 1 | package rush.utils.serializer; 2 | 3 | import java.io.ByteArrayInputStream; 4 | import java.io.ByteArrayOutputStream; 5 | import java.io.DataInputStream; 6 | import java.io.DataOutput; 7 | import java.io.DataOutputStream; 8 | import java.lang.reflect.Constructor; 9 | import java.math.BigInteger; 10 | 11 | import org.bukkit.Material; 12 | import org.bukkit.inventory.ItemStack; 13 | import org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder; 14 | 15 | import rush.utils.ReflectionUtils; 16 | import rush.utils.objectStream.BukkitObjectInputStream; 17 | import rush.utils.objectStream.BukkitObjectOutputStream; 18 | 19 | public class SerializerNEW { 20 | 21 | public static ItemStack deserializeItemStack(String data) { 22 | ByteArrayInputStream inputStream = new ByteArrayInputStream(new BigInteger(data, 32).toByteArray()); 23 | DataInputStream dataInputStream = new DataInputStream(inputStream); 24 | 25 | ItemStack itemStack = null; 26 | try { 27 | Class nbtTagCompoundClass = ReflectionUtils.getNMSClass("NBTTagCompound"); 28 | Class nmsItemStackClass = ReflectionUtils.getNMSClass("ItemStack"); 29 | Object nbtTagCompound = ReflectionUtils.getNMSClass("NBTCompressedStreamTools").getMethod("a", DataInputStream.class).invoke(null, dataInputStream); 30 | Constructor craftItemStackConstructor = nmsItemStackClass.getDeclaredConstructor(nbtTagCompoundClass); 31 | craftItemStackConstructor.setAccessible(true); 32 | Object craftItemStack = craftItemStackConstructor.newInstance(nbtTagCompound); 33 | itemStack = (ItemStack) ReflectionUtils.getOBClass("inventory.CraftItemStack").getMethod("asBukkitCopy", nmsItemStackClass).invoke(null, craftItemStack); 34 | } catch (Throwable e) { 35 | e.printStackTrace(); 36 | } 37 | 38 | return itemStack; 39 | } 40 | 41 | public static ItemStack[] deserializeListItemStack(String itens) { 42 | ByteArrayInputStream inputStream = new ByteArrayInputStream(Base64Coder.decodeLines(itens)); 43 | BukkitObjectInputStream dataInput; 44 | 45 | try { 46 | dataInput = new BukkitObjectInputStream(inputStream); 47 | int size = dataInput.readInt(); 48 | ItemStack[] list = new ItemStack[size]; 49 | 50 | for (int i = 0; i < size; i++) { 51 | Object utf = dataInput.readObject(); 52 | int slot = dataInput.readInt(); 53 | if (utf != null) list[slot] = deserializeItemStack((String) utf); 54 | } 55 | 56 | dataInput.close(); 57 | return list; 58 | } catch (Throwable e) { 59 | e.printStackTrace(); 60 | } 61 | 62 | return null; 63 | } 64 | 65 | public static String serializeItemStack(ItemStack item) { 66 | ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); 67 | DataOutputStream dataOutput = new DataOutputStream(outputStream); 68 | 69 | try { 70 | Class nbtTagCompoundClass = ReflectionUtils.getNMSClass("NBTTagCompound"); 71 | Constructor nbtTagCompoundConstructor = nbtTagCompoundClass.getConstructor(); 72 | Object nbtTagCompound = nbtTagCompoundConstructor.newInstance(); 73 | Object nmsItemStack = ReflectionUtils.getOBClass("inventory.CraftItemStack").getMethod("asNMSCopy", ItemStack.class).invoke(null, item); 74 | ReflectionUtils.getNMSClass("ItemStack").getMethod("save", nbtTagCompoundClass).invoke(nmsItemStack, nbtTagCompound); 75 | ReflectionUtils.getNMSClass("NBTCompressedStreamTools").getMethod("a", nbtTagCompoundClass, DataOutput.class).invoke(null, nbtTagCompound, (DataOutput) dataOutput); 76 | } catch (Throwable e) { 77 | e.printStackTrace(); 78 | } 79 | 80 | return new BigInteger(1, outputStream.toByteArray()).toString(32); 81 | } 82 | 83 | public static String serializeListItemStack(ItemStack[] itens) { 84 | ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); 85 | BukkitObjectOutputStream dataOutput; 86 | 87 | try { 88 | dataOutput = new BukkitObjectOutputStream(outputStream); 89 | dataOutput.writeInt(itens.length); 90 | 91 | int index = 0; 92 | for (ItemStack is : itens) { 93 | if (is != null && is.getType() != Material.AIR) { 94 | dataOutput.writeObject(serializeItemStack(is)); 95 | } else { 96 | dataOutput.writeObject(null); 97 | } 98 | dataOutput.writeInt(index); 99 | index++; 100 | } 101 | 102 | dataOutput.close(); 103 | } catch (Throwable e) { 104 | e.printStackTrace(); 105 | } 106 | 107 | return Base64Coder.encodeLines(outputStream.toByteArray()); 108 | } 109 | 110 | } -------------------------------------------------------------------------------- /src/rush/apis/AnvilAPI.java: -------------------------------------------------------------------------------- 1 | package rush.apis; 2 | 3 | import java.lang.reflect.Constructor; 4 | import java.lang.reflect.Field; 5 | import java.lang.reflect.Method; 6 | 7 | import org.bukkit.Location; 8 | import org.bukkit.entity.Player; 9 | 10 | import rush.Main; 11 | import rush.utils.ReflectionUtils; 12 | 13 | public class AnvilAPI { 14 | 15 | private static Constructor containerAnvilConstructor; 16 | private static Constructor blockPositionConstructor; 17 | private static Constructor packetConstructor; 18 | private static Method nextContainerCounter; 19 | private static Method addSlotListener; 20 | private static Method getHandle; 21 | private static Object message; 22 | private static Field windowId; 23 | private static Field worldField; 24 | private static Field inventoryField; 25 | private static Field checkReachableField; 26 | private static Field activeContainerField; 27 | 28 | public static void openAnvil(Player p) { 29 | try { 30 | Location l = p.getLocation(); 31 | int x = l.getBlockX(); 32 | int y = l.getBlockY(); 33 | int z = l.getBlockZ(); 34 | 35 | Object packet; 36 | Object container; 37 | Object entityPlayer = getHandle.invoke(p); 38 | Object world = worldField.get(entityPlayer); 39 | Object inventory = inventoryField.get(entityPlayer); 40 | Object counter = nextContainerCounter.invoke(entityPlayer); 41 | 42 | if (!Main.isOldVersion()) { 43 | Object blockPosition = blockPositionConstructor.newInstance(x, y, z); 44 | container = containerAnvilConstructor.newInstance(inventory, world, blockPosition, entityPlayer); 45 | packet = packetConstructor.newInstance(counter, "minecraft:anvil", message); 46 | } else { 47 | container = containerAnvilConstructor.newInstance(inventory, world, x, y, z, entityPlayer); 48 | packet = packetConstructor.newInstance(counter, 8, "Repairing", 9, false); 49 | } 50 | 51 | ReflectionUtils.sendPacket(p, packet); 52 | 53 | windowId.set(container, counter); 54 | checkReachableField.set(container, false); 55 | activeContainerField.set(entityPlayer, container); 56 | addSlotListener.invoke(container, entityPlayer); 57 | } catch (Throwable e) { 58 | e.printStackTrace(); 59 | } 60 | } 61 | 62 | static void load() { 63 | try 64 | { 65 | Class craftPlayerClass = ReflectionUtils.getOBClass("entity.CraftPlayer"); 66 | Class entityPlayerClass = ReflectionUtils.getNMSClass("EntityPlayer"); 67 | Class containerAnvilClass = ReflectionUtils.getNMSClass("ContainerAnvil"); 68 | 69 | getHandle = craftPlayerClass.getMethod("getHandle"); 70 | nextContainerCounter = entityPlayerClass.getMethod("nextContainerCounter"); 71 | 72 | worldField = entityPlayerClass.getField("world"); 73 | inventoryField = entityPlayerClass.getField("inventory"); 74 | activeContainerField = entityPlayerClass.getField("activeContainer"); 75 | checkReachableField = containerAnvilClass.getField("checkReachable"); 76 | windowId = containerAnvilClass.getField("windowId"); 77 | 78 | Class icraftingClass = ReflectionUtils.getNMSClass("ICrafting"); 79 | Class containerClass = ReflectionUtils.getNMSClass("Container"); 80 | addSlotListener = containerClass.getMethod("addSlotListener", icraftingClass); 81 | 82 | Class playerInventoryClass = ReflectionUtils.getNMSClass("PlayerInventory"); 83 | Class worldClass = ReflectionUtils.getNMSClass("World"); 84 | Class entityHumanClass = ReflectionUtils.getNMSClass("EntityHuman"); 85 | if (!Main.isOldVersion()) { 86 | Class blockPositionClass = ReflectionUtils.getNMSClass("BlockPosition"); 87 | blockPositionConstructor = blockPositionClass.getConstructor(int.class, int.class, int.class); 88 | containerAnvilConstructor = containerAnvilClass.getConstructor(playerInventoryClass, worldClass, blockPositionClass, entityHumanClass); 89 | } else { 90 | containerAnvilConstructor = containerAnvilClass.getConstructor(playerInventoryClass, worldClass, int.class, int.class, int.class, entityHumanClass); 91 | } 92 | 93 | Class packetOpenWindowClass; 94 | if (Main.isVeryOldVersion()) { 95 | packetOpenWindowClass = ReflectionUtils.getNMSClass("Packet100OpenWindow"); 96 | } else { 97 | packetOpenWindowClass = ReflectionUtils.getNMSClass("PacketPlayOutOpenWindow"); 98 | } 99 | 100 | if (!Main.isOldVersion()) { 101 | Class icbc = ReflectionUtils.getNMSClass("IChatBaseComponent"); 102 | Class cm = ReflectionUtils.getNMSClass("ChatMessage"); 103 | Constructor messageConstrutor = cm.getConstructor(String.class, Object[].class); 104 | packetConstructor = packetOpenWindowClass.getConstructor(int.class, String.class, icbc); 105 | message = messageConstrutor.newInstance("Repairing", new Object[] {}); 106 | } else { 107 | packetConstructor = packetOpenWindowClass.getConstructor(int.class, int.class, String.class, int.class, boolean.class); 108 | } 109 | } 110 | catch (Throwable e) {} 111 | } 112 | 113 | } -------------------------------------------------------------------------------- /src/rush/utils/serializer/SerializerVeryNEW.java: -------------------------------------------------------------------------------- 1 | package rush.utils.serializer; 2 | 3 | import java.io.ByteArrayInputStream; 4 | import java.io.ByteArrayOutputStream; 5 | import java.io.DataInput; 6 | import java.io.DataInputStream; 7 | import java.io.DataOutput; 8 | import java.io.DataOutputStream; 9 | import java.lang.reflect.Constructor; 10 | import java.math.BigInteger; 11 | 12 | import org.bukkit.Material; 13 | import org.bukkit.inventory.ItemStack; 14 | import org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder; 15 | 16 | import rush.utils.ReflectionUtils; 17 | import rush.utils.objectStream.BukkitObjectInputStream; 18 | import rush.utils.objectStream.BukkitObjectOutputStream; 19 | 20 | public class SerializerVeryNEW { 21 | 22 | public static ItemStack deserializeItemStack(String data) { 23 | ByteArrayInputStream inputStream = new ByteArrayInputStream(new BigInteger(data, 32).toByteArray()); 24 | DataInput dataInputStream = new DataInputStream(inputStream); 25 | 26 | ItemStack itemStack = null; 27 | try { 28 | Class nbtTagCompoundClass = ReflectionUtils.getNMSClass("NBTTagCompound"); 29 | Class nmsItemStackClass = ReflectionUtils.getNMSClass("ItemStack"); 30 | Object nbtTagCompound = ReflectionUtils.getNMSClass("NBTCompressedStreamTools").getMethod("a", DataInput.class).invoke(null, dataInputStream); 31 | Constructor craftItemStackConstructor = nmsItemStackClass.getDeclaredConstructor(nbtTagCompoundClass); 32 | craftItemStackConstructor.setAccessible(true); 33 | Object craftItemStack = craftItemStackConstructor.newInstance(nbtTagCompound); 34 | itemStack = (ItemStack) ReflectionUtils.getOBClass("inventory.CraftItemStack").getMethod("asBukkitCopy", nmsItemStackClass).invoke(null, craftItemStack); 35 | } catch (Throwable e) { 36 | e.printStackTrace(); 37 | } 38 | 39 | return itemStack; 40 | } 41 | 42 | public static ItemStack[] deserializeListItemStack(String itens) { 43 | ByteArrayInputStream inputStream = new ByteArrayInputStream(Base64Coder.decodeLines(itens)); 44 | BukkitObjectInputStream dataInput; 45 | 46 | try { 47 | dataInput = new BukkitObjectInputStream(inputStream); 48 | int size = dataInput.readInt(); 49 | ItemStack[] list = new ItemStack[size]; 50 | 51 | for (int i = 0; i < size; i++) { 52 | Object utf = dataInput.readObject(); 53 | int slot = dataInput.readInt(); 54 | if (utf != null) list[slot] = deserializeItemStack((String) utf); 55 | } 56 | 57 | dataInput.close(); 58 | return list; 59 | } catch (Throwable e) { 60 | e.printStackTrace(); 61 | } 62 | 63 | return null; 64 | } 65 | 66 | public static String serializeItemStack(ItemStack item) { 67 | ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); 68 | DataOutputStream dataOutput = new DataOutputStream(outputStream); 69 | 70 | try { 71 | Class nbtTagCompoundClass = ReflectionUtils.getNMSClass("NBTTagCompound"); 72 | Constructor nbtTagCompoundConstructor = nbtTagCompoundClass.getConstructor(); 73 | Object nbtTagCompound = nbtTagCompoundConstructor.newInstance(); 74 | Object nmsItemStack = ReflectionUtils.getOBClass("inventory.CraftItemStack").getMethod("asNMSCopy", ItemStack.class).invoke(null, item); 75 | ReflectionUtils.getNMSClass("ItemStack").getMethod("save", nbtTagCompoundClass).invoke(nmsItemStack, nbtTagCompound); 76 | ReflectionUtils.getNMSClass("NBTCompressedStreamTools").getMethod("a", nbtTagCompoundClass, DataOutput.class).invoke(null, nbtTagCompound, (DataOutput) dataOutput); 77 | } catch (Throwable e) { 78 | e.printStackTrace(); 79 | } 80 | 81 | return new BigInteger(1, outputStream.toByteArray()).toString(32); 82 | } 83 | 84 | public static String serializeListItemStack(ItemStack[] itens) { 85 | ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); 86 | BukkitObjectOutputStream dataOutput; 87 | 88 | try { 89 | dataOutput = new BukkitObjectOutputStream(outputStream); 90 | dataOutput.writeInt(itens.length); 91 | 92 | int index = 0; 93 | for (ItemStack is : itens) { 94 | if (is != null && is.getType() != Material.AIR) { 95 | dataOutput.writeObject(serializeItemStack(is)); 96 | } else { 97 | dataOutput.writeObject(null); 98 | } 99 | dataOutput.writeInt(index); 100 | index++; 101 | } 102 | 103 | dataOutput.close(); 104 | } catch (Throwable e) { 105 | e.printStackTrace(); 106 | } 107 | 108 | return Base64Coder.encodeLines(outputStream.toByteArray()); 109 | } 110 | 111 | } -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled 3 | org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore 4 | org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull 5 | org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= 6 | org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault 7 | org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= 8 | org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable 9 | org.eclipse.jdt.core.compiler.annotation.nullable.secondary= 10 | org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled 11 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 12 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 13 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 14 | org.eclipse.jdt.core.compiler.compliance=1.8 15 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 16 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 17 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 18 | org.eclipse.jdt.core.compiler.problem.APILeak=warning 19 | org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning 20 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 21 | org.eclipse.jdt.core.compiler.problem.autoboxing=ignore 22 | org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning 23 | org.eclipse.jdt.core.compiler.problem.deadCode=warning 24 | org.eclipse.jdt.core.compiler.problem.deprecation=warning 25 | org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled 26 | org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled 27 | org.eclipse.jdt.core.compiler.problem.discouragedReference=warning 28 | org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore 29 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 30 | org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore 31 | org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore 32 | org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled 33 | org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore 34 | org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning 35 | org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning 36 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=error 37 | org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning 38 | org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled 39 | org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning 40 | org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning 41 | org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore 42 | org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore 43 | org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning 44 | org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore 45 | org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore 46 | org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled 47 | org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore 48 | org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore 49 | org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled 50 | org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning 51 | org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore 52 | org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning 53 | org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning 54 | org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore 55 | org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning 56 | org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning 57 | org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error 58 | org.eclipse.jdt.core.compiler.problem.nullReference=warning 59 | org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error 60 | org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning 61 | org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning 62 | org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore 63 | org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning 64 | org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore 65 | org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore 66 | org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore 67 | org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning 68 | org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning 69 | org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore 70 | org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore 71 | org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore 72 | org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore 73 | org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore 74 | org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled 75 | org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning 76 | org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled 77 | org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled 78 | org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled 79 | org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore 80 | org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning 81 | org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning 82 | org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled 83 | org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning 84 | org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning 85 | org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore 86 | org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning 87 | org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning 88 | org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled 89 | org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info 90 | org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore 91 | org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore 92 | org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore 93 | org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore 94 | org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled 95 | org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled 96 | org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled 97 | org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore 98 | org.eclipse.jdt.core.compiler.problem.unusedImport=warning 99 | org.eclipse.jdt.core.compiler.problem.unusedLabel=warning 100 | org.eclipse.jdt.core.compiler.problem.unusedLocal=warning 101 | org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore 102 | org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore 103 | org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled 104 | org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled 105 | org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled 106 | org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning 107 | org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore 108 | org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning 109 | org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning 110 | org.eclipse.jdt.core.compiler.source=1.8 111 | -------------------------------------------------------------------------------- /src/rush/apis/ItemAPI.java: -------------------------------------------------------------------------------- 1 | package rush.apis; 2 | 3 | import java.lang.reflect.Field; 4 | import java.lang.reflect.Method; 5 | import java.util.Map; 6 | import java.util.Random; 7 | 8 | import org.bukkit.inventory.ItemStack; 9 | 10 | import rush.Main; 11 | import rush.utils.ReflectionUtils; 12 | 13 | public class ItemAPI { 14 | 15 | private static Class ItemStackClass; 16 | private static Class CraftItemStackClass; 17 | private static Class NBTTagCompoundClass; 18 | private static Class NBTTagListClass; 19 | private static Class NBTTagStringClass; 20 | private static Class NBTTagIntClass; 21 | private static Class NBTTagDoubleClass; 22 | private static Method asNMSCopy; 23 | private static Method asBukkitCopy; 24 | private static Method asCraftMirror; 25 | private static Method getRepairCost; 26 | private static Method setRepairCost; 27 | private static Method setNBTTagCompound; 28 | private static Method hasNBTTagCompound; 29 | private static Method getNBTTagCompound; 30 | private static Method hasKey; 31 | private static Method removeKey; 32 | private static Method getString; 33 | private static Method getBoolean; 34 | private static Method setString; 35 | private static Method setBoolean; 36 | private static Method getNBTBase; 37 | private static Method getNBTList; 38 | private static Method hasTag; 39 | private static Method setNBTBaseCompound; 40 | private static Method addNBTBaseTag; 41 | private static Method createTag; 42 | private static Field map; 43 | 44 | public static ItemStack setAttributeNBT(ItemStack item, String attribute, double value, int operation) { 45 | int least = new Random().nextInt(8192); 46 | int most = new Random().nextInt(8192); 47 | try { 48 | Object NBTTagCompound; 49 | Object CraftItemStack = asNMSCopy.invoke(null, item); 50 | boolean hasNBTTag = (boolean) hasNBTTagCompound.invoke(CraftItemStack); 51 | if (hasNBTTag) { 52 | NBTTagCompound = getNBTTagCompound.invoke(CraftItemStack); 53 | } else { 54 | NBTTagCompound = NBTTagCompoundClass.newInstance(); 55 | } 56 | 57 | Object AttributeModifiers; 58 | Object Modifier = NBTTagCompoundClass.newInstance(); 59 | boolean hasAttribute = (boolean) hasTag.invoke(NBTTagCompound, "AttributeModifiers"); 60 | if (hasAttribute) { 61 | AttributeModifiers = getNBTList.invoke(NBTTagCompound, "AttributeModifiers", 10); 62 | } else { 63 | AttributeModifiers = NBTTagListClass.newInstance(); 64 | } 65 | 66 | Object AttributeName = createTag.invoke(null, (byte) 8); 67 | Field fieldAttributeName = NBTTagStringClass.getDeclaredField("data"); 68 | fieldAttributeName.setAccessible(true); 69 | fieldAttributeName.set(AttributeName, attribute); 70 | 71 | Object Name = createTag.invoke(null, (byte) 8); 72 | Field fieldName = NBTTagStringClass.getDeclaredField("data"); 73 | fieldName.setAccessible(true); 74 | fieldName.set(Name, attribute); 75 | 76 | Object Amount = createTag.invoke(null, (byte) 6); 77 | Field fieldAmount = NBTTagDoubleClass.getDeclaredField("data"); 78 | fieldAmount.setAccessible(true); 79 | fieldAmount.set(Amount, value); 80 | 81 | Object Operation = createTag.invoke(null, (byte) 3); 82 | Field fieldOperation = NBTTagIntClass.getDeclaredField("data"); 83 | fieldOperation.setAccessible(true); 84 | fieldOperation.set(Operation, operation); 85 | 86 | Object UUIDLeast = createTag.invoke(null, (byte) 3); 87 | Field fieldUUIDLeast = NBTTagIntClass.getDeclaredField("data"); 88 | fieldUUIDLeast.setAccessible(true); 89 | fieldUUIDLeast.set(UUIDLeast, least); 90 | 91 | Object UUIDMost = createTag.invoke(null, (byte) 3); 92 | Field fieldUUIDMost = NBTTagIntClass.getDeclaredField("data"); 93 | fieldUUIDMost.setAccessible(true); 94 | fieldUUIDMost.set(UUIDMost, most); 95 | 96 | setNBTBaseCompound.invoke(Modifier, "AttributeName", AttributeName); 97 | setNBTBaseCompound.invoke(Modifier, "Name", Name); 98 | setNBTBaseCompound.invoke(Modifier, "Amount", Amount); 99 | setNBTBaseCompound.invoke(Modifier, "Operation", Operation); 100 | setNBTBaseCompound.invoke(Modifier, "UUIDLeast", UUIDLeast); 101 | setNBTBaseCompound.invoke(Modifier, "UUIDMost", UUIDMost); 102 | 103 | Object NBTBase = getNBTBase.invoke(Modifier); 104 | if (Main.isVeryFuckingNewVersion()) { 105 | addNBTBaseTag.invoke(AttributeModifiers, 0, NBTBase); 106 | } else { 107 | addNBTBaseTag.invoke(AttributeModifiers, NBTBase); 108 | } 109 | setNBTBaseCompound.invoke(NBTTagCompound, "AttributeModifiers", AttributeModifiers); 110 | setNBTTagCompound.invoke(CraftItemStack, NBTTagCompound); 111 | 112 | return (ItemStack) asCraftMirror.invoke(null, CraftItemStack); 113 | } catch (Throwable e) { 114 | e.printStackTrace(); 115 | return null; 116 | } 117 | } 118 | 119 | public static boolean hasInfo(ItemStack item, String key) { 120 | try { 121 | Object CraftItemStack = asNMSCopy.invoke(null, item); 122 | boolean hasNBTTag = (boolean) hasNBTTagCompound.invoke(CraftItemStack); 123 | if (hasNBTTag) { 124 | Object NBTTagCompound = getNBTTagCompound.invoke(CraftItemStack); 125 | return (boolean) hasKey.invoke(NBTTagCompound, key); 126 | } 127 | return false; 128 | } catch (Throwable e) { 129 | e.printStackTrace(); 130 | return false; 131 | } 132 | } 133 | 134 | public static String getInfo(ItemStack item, String key) { 135 | try { 136 | Object CraftItemStack = asNMSCopy.invoke(null, item); 137 | boolean hasNBTTag = (boolean) hasNBTTagCompound.invoke(CraftItemStack); 138 | if (hasNBTTag) { 139 | Object NBTTagCompound = getNBTTagCompound.invoke(CraftItemStack); 140 | return getString.invoke(NBTTagCompound, key).toString(); 141 | } 142 | return null; 143 | } catch (Throwable e) { 144 | e.printStackTrace(); 145 | return null; 146 | } 147 | } 148 | 149 | public static ItemStack saveInfo(ItemStack item, String key, String value) { 150 | try { 151 | Object NBTTagCompound; 152 | Object CraftItemStack = asNMSCopy.invoke(null, item); 153 | boolean hasNBTTag = (boolean) hasNBTTagCompound.invoke(CraftItemStack); 154 | if (hasNBTTag) { 155 | NBTTagCompound = getNBTTagCompound.invoke(CraftItemStack); 156 | } else { 157 | NBTTagCompound = NBTTagCompoundClass.newInstance(); 158 | } 159 | setString.invoke(NBTTagCompound, key, value); 160 | setNBTTagCompound.invoke(CraftItemStack, NBTTagCompound); 161 | return (ItemStack) asCraftMirror.invoke(null, CraftItemStack); 162 | } catch (Throwable e) { 163 | e.printStackTrace(); 164 | return null; 165 | } 166 | } 167 | 168 | public static ItemStack removeInfo(ItemStack item, String key) { 169 | try { 170 | Object NBTTagCompound; 171 | Object CraftItemStack = asNMSCopy.invoke(null, item); 172 | boolean hasNBTTag = (boolean) hasNBTTagCompound.invoke(CraftItemStack); 173 | if (hasNBTTag) { 174 | NBTTagCompound = getNBTTagCompound.invoke(CraftItemStack); 175 | } else { 176 | NBTTagCompound = NBTTagCompoundClass.newInstance(); 177 | } 178 | removeKey.invoke(NBTTagCompound, key); 179 | setNBTTagCompound.invoke(CraftItemStack, NBTTagCompound); 180 | return (ItemStack) asCraftMirror.invoke(null, CraftItemStack); 181 | } catch (Throwable e) { 182 | e.printStackTrace(); 183 | return null; 184 | } 185 | } 186 | 187 | @SuppressWarnings("unchecked") 188 | public static Map getInfos(ItemStack item) { 189 | try { 190 | Object CraftItemStack = asNMSCopy.invoke(null, item); 191 | boolean hasNBTTag = (boolean) hasNBTTagCompound.invoke(CraftItemStack); 192 | if (hasNBTTag) { 193 | Object NBTTagCompound = getNBTTagCompound.invoke(CraftItemStack); 194 | return (Map) map.get(NBTTagCompound); 195 | } 196 | return null; 197 | } catch (Throwable e) { 198 | e.printStackTrace(); 199 | return null; 200 | } 201 | } 202 | public static boolean isUnbreakable(ItemStack item) { 203 | try { 204 | Object NBTTagCompound; 205 | Object CraftItemStack = asNMSCopy.invoke(null, item); 206 | boolean hasNBTTag = (boolean) hasNBTTagCompound.invoke(CraftItemStack); 207 | if (hasNBTTag) { 208 | NBTTagCompound = getNBTTagCompound.invoke(CraftItemStack); 209 | } else { 210 | return false; 211 | } 212 | return (boolean) getBoolean.invoke(NBTTagCompound, "Unbreakable"); 213 | } catch (Throwable e) { 214 | e.printStackTrace(); 215 | return false; 216 | } 217 | } 218 | 219 | public static ItemStack setUnbreakable(ItemStack item, boolean bool) { 220 | if (item.getType().getMaxDurability() != 0 && item.getDurability() != 0) { 221 | item.setDurability((short) 0); 222 | } 223 | try { 224 | Object NBTTagCompound; 225 | Object CraftItemStack = asNMSCopy.invoke(null, item); 226 | boolean hasNBTTag = (boolean) hasNBTTagCompound.invoke(CraftItemStack); 227 | if (hasNBTTag) { 228 | NBTTagCompound = getNBTTagCompound.invoke(CraftItemStack); 229 | } else { 230 | NBTTagCompound = NBTTagCompoundClass.newInstance(); 231 | } 232 | setBoolean.invoke(NBTTagCompound, "Unbreakable", true); 233 | setNBTTagCompound.invoke(CraftItemStack, NBTTagCompound); 234 | return (ItemStack) asCraftMirror.invoke(null, CraftItemStack); 235 | } catch (Throwable e) { 236 | e.printStackTrace(); 237 | return null; 238 | } 239 | } 240 | 241 | public static int getRepairCost(ItemStack item) { 242 | try { 243 | Object CraftItemStack = asNMSCopy.invoke(null, item); 244 | int cost = (int) getRepairCost.invoke(CraftItemStack); 245 | if (item.getType().getMaxDurability() != 0) { 246 | double durability = item.getDurability(); 247 | double maxDurability = item.getType().getMaxDurability(); 248 | double durabilityPercent = (durability * 100.0) / maxDurability; 249 | if (durabilityPercent <= 25.0) cost += 1; 250 | else if (durabilityPercent <= 50.0) cost += 2; 251 | else if (durabilityPercent <= 75.0) cost += 3; 252 | else if (durabilityPercent <= 100.0) cost += 4; 253 | } 254 | return cost; 255 | } catch (Throwable e) { 256 | e.printStackTrace(); 257 | return 40; 258 | } 259 | } 260 | 261 | public static ItemStack setRepairCost(ItemStack item, int cost) { 262 | try { 263 | Object CraftItemStack = asNMSCopy.invoke(null, item); 264 | setRepairCost.invoke(CraftItemStack, cost); 265 | return (ItemStack) asBukkitCopy.invoke(null, CraftItemStack); 266 | } catch (Throwable e) { 267 | e.printStackTrace(); 268 | return item; 269 | } 270 | } 271 | 272 | static void load() { 273 | try 274 | { 275 | // Item Classes 276 | ItemStackClass = ReflectionUtils.getNMSClass("ItemStack"); 277 | CraftItemStackClass = ReflectionUtils.getOBClass("inventory.CraftItemStack"); 278 | 279 | // NBTTag Classes 280 | NBTTagCompoundClass = ReflectionUtils.getNMSClass("NBTTagCompound"); 281 | NBTTagListClass = ReflectionUtils.getNMSClass("NBTTagList"); 282 | NBTTagStringClass = ReflectionUtils.getNMSClass("NBTTagString"); 283 | NBTTagIntClass = ReflectionUtils.getNMSClass("NBTTagInt"); 284 | NBTTagDoubleClass = ReflectionUtils.getNMSClass("NBTTagDouble"); 285 | Class NBTBaseClass = ReflectionUtils.getNMSClass("NBTBase"); 286 | 287 | // Item Handle Methods 288 | asNMSCopy = CraftItemStackClass.getDeclaredMethod("asNMSCopy", ItemStack.class); 289 | asBukkitCopy = CraftItemStackClass.getDeclaredMethod("asBukkitCopy", ItemStackClass); 290 | asCraftMirror = CraftItemStackClass.getDeclaredMethod("asCraftMirror", ItemStackClass); 291 | 292 | // Repair cost Methods 293 | getRepairCost = ItemStackClass.getDeclaredMethod("getRepairCost"); 294 | setRepairCost = ItemStackClass.getMethod("setRepairCost", int.class); 295 | 296 | // Item NBTTag Methods 297 | getNBTTagCompound = ItemStackClass.getDeclaredMethod("getTag"); 298 | hasNBTTagCompound = ItemStackClass.getDeclaredMethod("hasTag"); 299 | setNBTTagCompound = ItemStackClass.getDeclaredMethod("setTag", NBTTagCompoundClass); 300 | 301 | // Basic NBTTag Handle Methods 302 | hasKey = NBTTagCompoundClass.getDeclaredMethod("hasKey", String.class); 303 | removeKey = NBTTagCompoundClass.getDeclaredMethod("remove", String.class); 304 | getString = NBTTagCompoundClass.getDeclaredMethod("getString", String.class); 305 | getBoolean = NBTTagCompoundClass.getDeclaredMethod("getBoolean", String.class); 306 | setString = NBTTagCompoundClass.getDeclaredMethod("setString", String.class, String.class); 307 | setBoolean = NBTTagCompoundClass.getDeclaredMethod("setBoolean", String.class, boolean.class); 308 | 309 | // Item NBTTagCompound Field 310 | map = NBTTagCompoundClass.getDeclaredField("map"); 311 | map.setAccessible(true); 312 | 313 | // Advance NBTTag Handle 314 | getNBTBase = NBTTagCompoundClass.getDeclaredMethod("clone"); 315 | getNBTList = NBTTagCompoundClass.getDeclaredMethod("getList", String.class, int.class); 316 | hasTag = NBTTagCompoundClass.getDeclaredMethod("hasKey", String.class); 317 | setNBTBaseCompound = NBTTagCompoundClass.getDeclaredMethod("set", String.class, NBTBaseClass); 318 | createTag = NBTBaseClass.getDeclaredMethod("createTag", byte.class); 319 | createTag.setAccessible(true); 320 | if (Main.isVeryFuckingNewVersion()) { 321 | addNBTBaseTag = NBTTagListClass.getDeclaredMethod("b", int.class, NBTBaseClass); 322 | } else { 323 | addNBTBaseTag = NBTTagListClass.getDeclaredMethod("add", NBTBaseClass); 324 | } 325 | 326 | } 327 | catch (Throwable e) {} 328 | } 329 | 330 | } -------------------------------------------------------------------------------- /bin/comandos.yml: -------------------------------------------------------------------------------- 1 | file-version: 6 2 | comandos: 3 | alerta: 4 | ativar-comando: true 5 | aliases: [] 6 | descricao: "Envia uma alerta para todos do servidor." 7 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 8 | 9 | back: 10 | ativar-comando: true 11 | aliases: [] 12 | descricao: "Volta ao local anterior do seu teleporte." 13 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 14 | 15 | bigorna: 16 | ativar-comando: true 17 | aliases: [] 18 | descricao: "Abre uma bigorna virtual." 19 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 20 | 21 | chapeu: 22 | ativar-comando: true 23 | aliases: [hat] 24 | descricao: "Veste o chapéu que esta na sua mão." 25 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 26 | 27 | clear: 28 | ativar-comando: true 29 | aliases: [] 30 | descricao: "Limpa completamente seu inventario." 31 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 32 | 33 | clearchat: 34 | ativar-comando: true 35 | aliases: [] 36 | descricao: "Limpa o chat do servidor." 37 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 38 | 39 | compactar: 40 | ativar-comando: true 41 | aliases: [block, condense] 42 | descricao: "Compactar todos os itens do inventario." 43 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 44 | 45 | cores: 46 | ativar-comando: true 47 | aliases: [colors] 48 | descricao: "Mostra a lista de cores do minecraft." 49 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 50 | 51 | craft: 52 | ativar-comando: true 53 | aliases: [workbench] 54 | descricao: "Abre uma bancada de trabalho virtual." 55 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 56 | 57 | crashar: 58 | ativar-comando: true 59 | aliases: [derrubar] 60 | descricao: "Crasha o minecraft de um player." 61 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 62 | 63 | criarkit: 64 | ativar-comando: true 65 | aliases: [createkit] 66 | descricao: "Cria um kit." 67 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 68 | 69 | darkit: 70 | ativar-comando: true 71 | aliases: [givekit] 72 | descricao: "Envia um kit para um player." 73 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 74 | 75 | delhome: 76 | ativar-comando: true 77 | aliases: [] 78 | descricao: "Deleta uma home." 79 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 80 | 81 | delkit: 82 | ativar-comando: true 83 | aliases: [apagarkit] 84 | descricao: "Deleta um kit." 85 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 86 | 87 | delwarp: 88 | ativar-comando: true 89 | aliases: [] 90 | descricao: "Deleta uma warp." 91 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 92 | 93 | derreter: 94 | ativar-comando: true 95 | aliases: [aquecer] 96 | descricao: "Derrete todos os minérios do inventario." 97 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 98 | 99 | divulgar: 100 | ativar-comando: true 101 | aliases: [] 102 | descricao: "Divulga um link no chat." 103 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 104 | 105 | echest: 106 | ativar-comando: true 107 | aliases: [ec, enderchest] 108 | descricao: "Abre o enderchest virtual." 109 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 110 | 111 | editaritem: 112 | ativar-comando: true 113 | aliases: [renomear, lore] 114 | descricao: "Edita o item que esta na mão." 115 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 116 | 117 | editarkit: 118 | ativar-comando: true 119 | aliases: [editkit] 120 | descricao: "Edita um kit criado." 121 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 122 | 123 | editarplaca: 124 | ativar-comando: true 125 | aliases: [signedit] 126 | descricao: "Edita uma placa sem precisar quebra-la." 127 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 128 | 129 | enchant: 130 | ativar-comando: true 131 | aliases: [encantar] 132 | descricao: "Encanta um item de maneira fácil." 133 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 134 | 135 | estatisticas: 136 | ativar-comando: true 137 | aliases: [] 138 | descricao: "Mostra as estatisticas de um player." 139 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 140 | 141 | executarsom: 142 | ativar-comando: true 143 | aliases: [playsound, som] 144 | descricao: "Executa um som para um player ou para todo server." 145 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 146 | 147 | feed: 148 | ativar-comando: true 149 | aliases: [fome, comer] 150 | descricao: "Regenera toda sua fome." 151 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 152 | 153 | fly: 154 | ativar-comando: true 155 | aliases: [voar] 156 | descricao: "Ativa ou desativa o modo fly." 157 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 158 | 159 | gamemode: 160 | ativar-comando: true 161 | aliases: [gm] 162 | descricao: "Altera o seu modo de jogo." 163 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 164 | 165 | god: 166 | ativar-comando: true 167 | aliases: [deus] 168 | descricao: "Ativa ou desativa o modo imortal." 169 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 170 | 171 | heal: 172 | ativar-comando: true 173 | aliases: [curar, health] 174 | descricao: "Regenera toda sua vida." 175 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 176 | 177 | home: 178 | ativar-comando: true 179 | aliases: [] 180 | descricao: "Teleporta até uma home." 181 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 182 | 183 | homes: 184 | ativar-comando: true 185 | aliases: [] 186 | descricao: "Mostra a lista de homes salvas." 187 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 188 | 189 | invsee: 190 | ativar-comando: true 191 | aliases: [inv] 192 | descricao: "Abre o inventario de um player." 193 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 194 | 195 | kit: 196 | ativar-comando: true 197 | aliases: [] 198 | descricao: "Pega um kit." 199 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 200 | 201 | kits: 202 | ativar-comando: true 203 | aliases: [] 204 | descricao: "Lista todos os kits disponíveis." 205 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 206 | 207 | lixo: 208 | ativar-comando: true 209 | aliases: [lixeira] 210 | descricao: "Abre a lixeira virtual." 211 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 212 | 213 | luz: 214 | ativar-comando: true 215 | aliases: [lanterna] 216 | descricao: "Liga e desliga a lanterna." 217 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 218 | 219 | mundovip: 220 | ativar-comando: true 221 | aliases: [vip] 222 | descricao: "Teleporta até o mundo vip." 223 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 224 | 225 | online: 226 | ativar-comando: true 227 | aliases: [] 228 | descricao: "Mostra a numero de players online no servidor." 229 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 230 | 231 | particular: 232 | ativar-comando: true 233 | aliases: [privar] 234 | descricao: "Define uma home como particular." 235 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 236 | 237 | ping: 238 | ativar-comando: true 239 | aliases: [] 240 | descricao: "Mostra o seu ping atual." 241 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 242 | 243 | potion: 244 | ativar-comando: true 245 | aliases: [pocao] 246 | descricao: "Edita uma poção." 247 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 248 | 249 | publica: 250 | ativar-comando: true 251 | aliases: [] 252 | descricao: "Define uma home como publica." 253 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 254 | 255 | renderizacao: 256 | ativar-comando: true 257 | aliases: [render] 258 | descricao: "Altera sua renderização no servidor." 259 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 260 | 261 | reparar: 262 | ativar-comando: true 263 | aliases: [repair] 264 | descricao: "Reparar os seus itens." 265 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 266 | 267 | sethome: 268 | ativar-comando: true 269 | aliases: [] 270 | descricao: "Define uma home." 271 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 272 | 273 | setmundovip: 274 | ativar-comando: true 275 | aliases: [] 276 | descricao: "Define a mundo vip e não vip do servidor." 277 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 278 | 279 | setspawn: 280 | ativar-comando: true 281 | aliases: [] 282 | descricao: "Define o spawn do servidor." 283 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 284 | 285 | setwarp: 286 | ativar-comando: true 287 | aliases: [] 288 | descricao: "Define uma warp." 289 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 290 | 291 | sgive: 292 | ativar-comando: true 293 | aliases: [spawnergive, spawner] 294 | descricao: "Envia geradores para um player." 295 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 296 | 297 | skull: 298 | ativar-comando: true 299 | aliases: [head, cabeca] 300 | descricao: "Pega a cabeça de um player." 301 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 302 | 303 | slime: 304 | ativar-comando: true 305 | aliases: [slimechunk] 306 | descricao: "Verifica se você esta em uma slimechunk." 307 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 308 | 309 | spawn: 310 | ativar-comando: true 311 | aliases: [] 312 | descricao: "Teleporta até o spawn." 313 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 314 | 315 | speed: 316 | ativar-comando: true 317 | aliases: [velocidade] 318 | descricao: "Altera a velocidade do andar e do voar." 319 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 320 | 321 | sudo: 322 | ativar-comando: true 323 | aliases: [] 324 | descricao: "Executa um comando para um player." 325 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 326 | 327 | system: 328 | ativar-comando: true 329 | aliases: [rushyoutuber] 330 | descricao: "Comando gerenciador do plugin." 331 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 332 | 333 | title: 334 | ativar-comando: true 335 | aliases: [tm] 336 | descricao: "Envia um title para todo servidor." 337 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 338 | 339 | tp: 340 | ativar-comando: true 341 | aliases: [] 342 | descricao: "Executa teleportes." 343 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 344 | 345 | tpa: 346 | ativar-comando: true 347 | aliases: [] 348 | descricao: "Envia uma solicitação de teleporte." 349 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 350 | 351 | tpaccept: 352 | ativar-comando: true 353 | aliases: [tpaceitar] 354 | descricao: "Aceita uma solicitação de teleporte." 355 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 356 | 357 | tpall: 358 | ativar-comando: true 359 | aliases: [] 360 | descricao: "Teleporta todos os players." 361 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 362 | 363 | tpcancel: 364 | ativar-comando: true 365 | aliases: [tpcancelar] 366 | descricao: "Cancela uma solicitação de teleporte enviada." 367 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 368 | 369 | tpdeny: 370 | ativar-comando: true 371 | aliases: [tpnegar] 372 | descricao: "Rejeita uma solicitação de teleporte." 373 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 374 | 375 | tphere: 376 | ativar-comando: true 377 | aliases: [puxar] 378 | descricao: "Teleporta um player até você." 379 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 380 | 381 | tptoggle: 382 | ativar-comando: true 383 | aliases: [tpdesativar] 384 | descricao: "Desativa o recebimento de solicitações de teleporte." 385 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 386 | 387 | vanish: 388 | ativar-comando: true 389 | aliases: [v] 390 | descricao: "Ativa ou desativa o modo invisível." 391 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 392 | 393 | verkit: 394 | ativar-comando: true 395 | aliases: [visualizarkit] 396 | descricao: "Visualiza os itens de um kit." 397 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 398 | 399 | verinfo: 400 | ativar-comando: true 401 | aliases: [playerinfo, whois] 402 | descricao: "Visualiza as informações de um player." 403 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 404 | 405 | warp: 406 | ativar-comando: true 407 | aliases: [] 408 | descricao: "Teleporta até uma warp." 409 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." 410 | 411 | warps: 412 | ativar-comando: true 413 | aliases: [] 414 | descricao: "Lista todas as warps disponíveis." 415 | sem-permissao: "&cVocê não tem permissão para utilizar este comando." --------------------------------------------------------------------------------