nathan3030 Posté(e) le 15 avril 2017 Posté(e) le 15 avril 2017 Titre du sujet : Inventaire par monde Sujet : Version de minecraft / skript : 1.11.2 Type du skript : Skript d'inventaire Description du script : Bonjour , je voudrais un skript pour séparer les inventaires de chaque maps comme le plugins mutiverse . Je demande ce skript car le plugin multiverse ne fonctionne pas . Cordialement
GhostKiller76 Posté(e) le 15 avril 2017 Posté(e) le 15 avril 2017 Pour faire fonctionner Multiverse-Inventories il faut que tu ait le plugin Multiverse-Core :) 1
GhostKiller76 Posté(e) le 15 avril 2017 Posté(e) le 15 avril 2017 Des erreurs dans les logs de la console
nathan3030 Posté(e) le 15 avril 2017 Auteur Posté(e) le 15 avril 2017 Oui la suivante : [10:01:48] [server thread/ERROR]: Could not pass event PlayerChangedWorldEvent to Multiverse-Inventories v2.5-b335 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigotmc-1.11.2-R0.1.jar:git-Spigot-d276ab1-d219213] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigotmc-1.11.2-R0.1.jar:git-Spigot-d276ab1-d219213] at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigotmc-1.11.2-R0.1.jar:git-Spigot-d276ab1-d219213] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigotmc-1.11.2-R0.1.jar:git-Spigot-d276ab1-d219213] at net.minecraft.server.v1_11_R1.PlayerList.moveToWorld(PlayerList.java:682) [spigotmc-1.11.2-R0.1.jar:git-Spigot-d276ab1-d219213] at org.bukkit.craftbukkit.v1_11_R1.entity.CraftPlayer.teleport(CraftPlayer.java:508) [spigotmc-1.11.2-R0.1.jar:git-Spigot-d276ab1-d219213] at org.bukkit.craftbukkit.v1_11_R1.entity.CraftEntity.teleport(CraftEntity.java:260) [spigotmc-1.11.2-R0.1.jar:git-Spigot-d276ab1-d219213] at com.onarandombox.MultiverseCore.utils.SimpleSafeTTeleporter.safelyTeleport(SimpleSafeTTeleporter.java:215) [Multiverse-Core-2.5.jar:?] at com.onarandombox.MultiverseCore.utils.SimpleSafeTTeleporter.teleport(SimpleSafeTTeleporter.java:335) [Multiverse-Core-2.5.jar:?] at com.onarandombox.MultiverseCore.commands.TeleportCommand.runCommand(TeleportCommand.java:163) [Multiverse-Core-2.5.jar:?] at com.pneumaticraft.commandhandler.multiverse.CommandHandler.checkAndRunCommand(CommandHandler.java:279) [Multiverse-Core-2.5.jar:?] at com.pneumaticraft.commandhandler.multiverse.CommandHandler.processFoundCommands(CommandHandler.java:143) [Multiverse-Core-2.5.jar:?] at com.pneumaticraft.commandhandler.multiverse.CommandHandler.locateAndRunCommand(CommandHandler.java:93) [Multiverse-Core-2.5.jar:?] at com.onarandombox.MultiverseCore.MultiverseCore.onCommand(MultiverseCore.java:916) [Multiverse-Core-2.5.jar:?] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) [spigotmc-1.11.2-R0.1.jar:git-Spigot-d276ab1-d219213] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) [spigotmc-1.11.2-R0.1.jar:git-Spigot-d276ab1-d219213] at org.bukkit.craftbukkit.v1_11_R1.CraftServer.dispatchCommand(CraftServer.java:650) [spigotmc-1.11.2-R0.1.jar:git-Spigot-d276ab1-d219213] at net.minecraft.server.v1_11_R1.PlayerConnection.handleCommand(PlayerConnection.java:1353) [spigotmc-1.11.2-R0.1.jar:git-Spigot-d276ab1-d219213] at net.minecraft.server.v1_11_R1.PlayerConnection.a(PlayerConnection.java:1188) [spigotmc-1.11.2-R0.1.jar:git-Spigot-d276ab1-d219213] at net.minecraft.server.v1_11_R1.PacketPlayInChat.a(PacketPlayInChat.java:45) [spigotmc-1.11.2-R0.1.jar:git-Spigot-d276ab1-d219213] at net.minecraft.server.v1_11_R1.PacketPlayInChat.a(PacketPlayInChat.java:1) [spigotmc-1.11.2-R0.1.jar:git-Spigot-d276ab1-d219213] at net.minecraft.server.v1_11_R1.PlayerConnectionUtils$1.run(SourceFile:13) [spigotmc-1.11.2-R0.1.jar:git-Spigot-d276ab1-d219213] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_112] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_112] at net.minecraft.server.v1_11_R1.SystemUtils.a(SourceFile:46) [spigotmc-1.11.2-R0.1.jar:git-Spigot-d276ab1-d219213] at net.minecraft.server.v1_11_R1.MinecraftServer.D(MinecraftServer.java:747) [spigotmc-1.11.2-R0.1.jar:git-Spigot-d276ab1-d219213] at net.minecraft.server.v1_11_R1.DedicatedServer.D(DedicatedServer.java:399) [spigotmc-1.11.2-R0.1.jar:git-Spigot-d276ab1-d219213] at net.minecraft.server.v1_11_R1.MinecraftServer.C(MinecraftServer.java:678) [spigotmc-1.11.2-R0.1.jar:git-Spigot-d276ab1-d219213] at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:576) [spigotmc-1.11.2-R0.1.jar:git-Spigot-d276ab1-d219213] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_112] Caused by: java.lang.NoSuchMethodError: org.bukkit.entity.Player.getHealth()I at com.onarandombox.multiverseinventories.api.share.Sharables$7.updateProfile(Sharables.java:163) ~[?:?] at com.onarandombox.multiverseinventories.ShareHandler.updateProfile(ShareHandler.java:114) ~[?:?] at com.onarandombox.multiverseinventories.ShareHandler.completeSharing(ShareHandler.java:86) ~[?:?] at com.onarandombox.multiverseinventories.ShareHandler.handleSharing(ShareHandler.java:60) ~[?:?] at com.onarandombox.multiverseinventories.InventoriesListener.playerChangedWorld(InventoriesListener.java:189) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_112] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_112] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_112] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_112] at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[spigotmc-1.11.2-R0.1.jar:git-Spigot-d276ab1-d219213] ... 29 more
GhostKiller76 Posté(e) le 15 avril 2017 Posté(e) le 15 avril 2017 D'accord beh on va faire un skript :) Télécharge cet addon qui te seras utile :) Ensuite voilà le code: on world change: wait 0.5 second clear player's inventory set player's helmet to {inv.%world of player%.%player%.helmet.main} set player's chestplate to {inv.%world of player%.%player%.chest.main} set player's leggings to {inv.%world of player%.%player%.legs.main} set player's boots to {inv.%world of player%.%player%.feet.main} set player's inventory's serialized contents to {inventory.%world of player%.%player%} On any move: wait 1 seconds set {inventory.%world of player%.%player%} to player's serialized inventory set {inv.%world of player%.%player%.helmet.main} to the helmet of the player set {inv.%world of player%.%player%.chest.main} to the chestplate of the player set {inv.%world of player%.%player%.legs.main} to the leggings of the player set {inv.%world of player%.%player%.feet.main} to the boots of the player 1
nathan3030 Posté(e) le 15 avril 2017 Auteur Posté(e) le 15 avril 2017 Je vien de tester mais tous ce qui est inventaire ne se marche pas , que les botte , pantalon , veste et casque qui marche
GhostKiller76 Posté(e) le 15 avril 2017 Posté(e) le 15 avril 2017 Essaye comme ça ducoup: on world change: equip player with {inv.%world of player%.%player%.helmet.main} equip player with {inv.%world of player%.%player%.chest.main} equip player with {inv.%world of player%.%player%.legs.main} equip player with {inv.%world of player%.%player%.feet.main} set player's inventory's serialized contents to {inventory.%world of player%.%player%} On any move: set {inventory.%world of player%.%player%} to player's serialized inventory set {inv.%world of player%.%player%.helmet.main} to the helmet of the player set {inv.%world of player%.%player%.chest.main} to the chestplate of the player set {inv.%world of player%.%player%.legs.main} to the leggings of the player set {inv.%world of player%.%player%.feet.main} to the boots of the player
GhostKiller76 Posté(e) le 15 avril 2017 Posté(e) le 15 avril 2017 Il faut bien que ton personnage bouge avant de changer de monde :) Et (je ne le pense pas) n'oublie pas de mettre des items dans ton inventaire A et ensuite va dans le monde B :) puis revient au monde A et dit moi tout :)
nathan3030 Posté(e) le 16 avril 2017 Auteur Posté(e) le 16 avril 2017 Oui j'avais bien compris mais laisse tomber je vais faire un bungee . Merci quand meme
FromFX Posté(e) le 20 avril 2017 Posté(e) le 20 avril 2017 GhostKiller tu es fou de mettre un "on any move" t'imagine il y a 20 personnes sur le serveur et que ça save une variable chaque mouvement ? Tu aurais créé une machine à lag :') on world change: wait 1 tick make console execute command "/minecraft:clear %player%" wait 1 tick set player's helmet to {inv.%world of player%.%player%.helmet.main} set player's chestplate to {inv.%world of player%.%player%.chest.main} set player's leggings to {inv.%world of player%.%player%.legs.main} set player's boots to {inv.%world of player%.%player%.feet.main} restore inventory of player from {inventory.%world of player%.%player%} on pickup: set {inventory.%world of player%.%player%} to player's serialized inventory set {inv.%world of player%.%player%.helmet.main} to the helmet of the player set {inv.%world of player%.%player%.chest.main} to the chestplate of the player set {inv.%world of player%.%player%.legs.main} to the leggings of the player set {inv.%world of player%.%player%.feet.main} to the boots of the player on inventory click: set {inventory.%world of player%.%player%} to player's serialized inventory set {inv.%world of player%.%player%.helmet.main} to the helmet of the player set {inv.%world of player%.%player%.chest.main} to the chestplate of the player set {inv.%world of player%.%player%.legs.main} to the leggings of the player set {inv.%world of player%.%player%.feet.main} to the boots of the player J'ai modifié ton code pour qu'ils soient beaucoup plus optimisé (pas trop mais j'ai fais vite) 1
Messages recommandés