Giter VIP home page Giter VIP logo

Comments (9)

joaoespanhol avatar joaoespanhol commented on August 30, 2024

[13:22:19 ERROR]: Could not pass event CreatureSpawnEvent to System v1.14.18
org.bukkit.event.EventException: null
at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:63) ~[EventExecutor.class:?]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:77) ~[TimedEventExecutor.class:?]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:66) ~[RegisteredListener.class:?]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:484) [SimplePluginManager.class:?]
at org.bukkit.craftbukkit.v1_12_R1.event.CraftEventFactory.callCreatureSpawnEvent(CraftEventFactory.java:380) [CraftEventFactory.class:?]
at net.minecraft.world.World.addEntity(World.java:1500) [amu.class:?]
at net.minecraft.world.WorldServer.addEntity(WorldServer.java:1251) [oo.class:?]
at net.minecraft.world.WorldEntitySpawner.findChunksForSpawning(WorldEntitySpawner.java:210) [anb.class:?]
at net.minecraft.world.WorldServer.tick(WorldServer.java:318) [oo.class:?]
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:884) [MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.updateTimeLightAndEntities(DedicatedServer.java:461) [nz.class:?]
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:778) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:624) [MinecraftServer.class:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312]
Caused by: java.lang.IllegalArgumentException: No enum constant rush.enums.EntityName.BEWITCHMENT_GHOST
at java.lang.Enum.valueOf(Enum.java:238) ~[?:1.8.0_312]
at rush.enums.EntityName.valueOf(EntityName.java:1) ~[?:?]
at rush.enums.EntityName.valueOf(EntityName.java:148) ~[?:?]
at rush.sistemas.gerais.StackMobs.onSpawn(StackMobs.java:66) ~[?:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor97.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:61) ~[EventExecutor.class:?]
... 13 more

Continua com mesmo error.

from system.

joaoespanhol avatar joaoespanhol commented on August 30, 2024

acontece com mohist 1.12.2 e das versões para cima

from system.

joaoespanhol avatar joaoespanhol commented on August 30, 2024

esse erro acontece, porque o plugin não consegue ler os mobs existe do server.
como é um server modpack, ele só esta a ler os mobs do diretorio já escrito.

from system.

joaoespanhol avatar joaoespanhol commented on August 30, 2024

https://github.com/eduardo-mior/System/blob/master/src/rush/enums/EntityName.java

Deve muda essa meto .

from system.

eduardo-mior avatar eduardo-mior commented on August 30, 2024

@joaoespanhol @RapperHiro78 para corrigir este problema basta desabilitar a função do StackMobs nas configurações do plugin

from system.

joaoespanhol avatar joaoespanhol commented on August 30, 2024

@joaoespanhol @RapperHiro78 para corrigir este problema basta desabilitar a função do StackMobs nas configurações do plugin

Isso não resolve o meu problema, pois preciso usar essa funcionalidade

Para corrigir este problema, pode usar algo deste tipo para obter mobs inves fazer uma lista deles

public void onSpawn(CreatureSpawnEvent event) {
Entity entity = event.getEntity();
EntityType type = entity.getType();

// Check if the entity type is recognized by the EntityName enum
try {
    String name = EntityName.valueOf(type.name()).toString();
    // rest of the code that uses the entity name...
} catch (IllegalArgumentException e) {
    // Entity type not recognized
    getLogger().warning("Entity type " + type.name() + " is not recognized.");
    return;
}

}

from system.

joaoespanhol avatar joaoespanhol commented on August 30, 2024

pode obter todos os mobs e por automaticamente do ficheiro, assim corrigir o problema.

from system.

eduardo-mior avatar eduardo-mior commented on August 30, 2024

@joaoespanhol infelizmente nem todas as funcionalidades do system funcionam em todas as versões do minecraft ou com todos os mods do minecraft.

O system foi desenvolvido para a versão 1.8 do minecraft porém ganhou suporte para as outras versões.

Nesse caso podemos contornar usando o código que você deu de exemplo ali, porém vale citar que o System esta programado daquele jeito para que possa ser feita a tradução dos nomes dos mobs para Português. Originalmente todos os mods e jars do bukkit e spigot disponibilizam apenas os nomes em Inglês, e essa classe EntityName do System serve para fazer a tradução do nome de Inglês para Português.

from system.

eduardo-mior avatar eduardo-mior commented on August 30, 2024

@joaoespanhol infelizmente não tenho tempo no momento para dar manutenção ou trabalhar em cima do System, sugiro que você faça um Fork do projeto e implemente esse código por conta própria.

Desculpa por não poder ajudar, mas infelizmente não tenho tempo para dar manutenção no System no momento.

from system.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.