Skocz do zawartości

Konspirant

Użytkownik
  • Ilość zawartości

    17
  • Rejestracja

  • Ostatnia wizyta

Ostatnie wizyty

Blok z ostatnimi odwiedzającymi dany profil jest wyłączony i nie jest wyświetlany użytkownikom.

Osiągnięcia Konspirant

Początkujący I

Początkujący I (2/13)

0

Reputacja

  1. Jest elegancko dziękuję za pomoc długo próbowałem sam to rozwiązać ale widać nie obyło się bez pomocy lepszych
  2. znaczy chyba dziala bo w compilatorze mam 1.8 i w build pachu tez mam 1.8 i nie ma błędów ale chcialbym sie zapytac czy plugin 1.15 bedzie dzialał
  3. mam 1.8 i dalej sa bledy
  4. pracuje w eclipse
  5. a jak to zrobic przepraszam ze może głupie pytanie ale zaczynam dopiero zabawę z pluginami
  6. Fatal error trying to convert EXP v1.0:me/paczka/ExpRpg/Main.class java.lang.IllegalArgumentException: Unsupported class file major version 61 at org.bukkit.craftbukkit.libs.org.objectweb.asm.ClassReader.<init>(ClassReader.java:196) ~[spigot.jar:git-Spigot-a99063f-8731c97] at org.bukkit.craftbukkit.libs.org.objectweb.asm.ClassReader.<init>(ClassReader.java:177) ~[spigot.jar:git-Spigot-a99063f-8731c97] at org.bukkit.craftbukkit.libs.org.objectweb.asm.ClassReader.<init>(ClassReader.java:163) ~[spigot.jar:git-Spigot-a99063f-8731c97] at org.bukkit.craftbukkit.v1_15_R1.util.Commodore.convert(Commodore.java:128) ~[spigot.jar:git-Spigot-a99063f-8731c97] at org.bukkit.craftbukkit.v1_15_R1.util.CraftMagicNumbers.processClass(CraftMagicNumbers.java:293) [spigot.jar:git-Spigot-a99063f-8731c97] at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:140) [spigot.jar:git-Spigot-a99063f-8731c97] at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:96) [spigot.jar:git-Spigot-a99063f-8731c97] at java.lang.ClassLoader.loadClass(Unknown Source) [?:1.8.0_301] at java.lang.ClassLoader.loadClass(Unknown Source) [?:1.8.0_301] at java.lang.Class.forName0(Native Method) ~[?:1.8.0_301] at java.lang.Class.forName(Unknown Source) [?:1.8.0_301] at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:64) [spigot.jar:git-Spigot-a99063f-8731c97] at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:135) [spigot.jar:git-Spigot-a99063f-8731c97] at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:394) [spigot.jar:git-Spigot-a99063f-8731c97] at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:301) [spigot.jar:git-Spigot-a99063f-8731c97] at org.bukkit.craftbukkit.v1_15_R1.CraftServer.loadPlugins(CraftServer.java:353) [spigot.jar:git-Spigot-a99063f-8731c97] at net.minecraft.server.v1_15_R1.DedicatedServer.init(DedicatedServer.java:210) [spigot.jar:git-Spigot-a99063f-8731c97] at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:784) [spigot.jar:git-Spigot-a99063f-8731c97] at java.lang.Thread.run(Unknown Source) [?:1.8.0_301] [12:41:34] [Server thread/ERROR]: Could not load 'plugins\EXPMOB.jar' in folder 'plugins' org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: me/paczka/ExpRpg/Main has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0 at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:139) ~[spigot.jar:git-Spigot-a99063f-8731c97] at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:394) ~[spigot.jar:git-Spigot-a99063f-8731c97] at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:301) [spigot.jar:git-Spigot-a99063f-8731c97] at org.bukkit.craftbukkit.v1_15_R1.CraftServer.loadPlugins(CraftServer.java:353) [spigot.jar:git-Spigot-a99063f-8731c97] at net.minecraft.server.v1_15_R1.DedicatedServer.init(DedicatedServer.java:210) [spigot.jar:git-Spigot-a99063f-8731c97] at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:784) [spigot.jar:git-Spigot-a99063f-8731c97] at java.lang.Thread.run(Unknown Source) [?:1.8.0_301] Caused by: java.lang.UnsupportedClassVersionError: me/paczka/ExpRpg/Main has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0 at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_301] at java.lang.ClassLoader.defineClass(Unknown Source) ~[?:1.8.0_301] at java.security.SecureClassLoader.defineClass(Unknown Source) ~[?:1.8.0_301] at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:163) ~[spigot.jar:git-Spigot-a99063f-8731c97] at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:96) ~[spigot.jar:git-Spigot-a99063f-8731c97] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_301] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_301] at java.lang.Class.forName0(Native Method) ~[?:1.8.0_301] at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_301] at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:64) ~[spigot.jar:git-Spigot-a99063f-8731c97] at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:135) ~[spigot.jar:git-Spigot-a99063f-8731c97] ... 6 more oto logi
  7. ale plugin jest pusty jeszcze bo sprawdzałem tylko czy poprawnie zrobiłem do tego momentu wszystko
  8. czyli co mam w końcu zrobic aby było dobrze bo z tego co czytam to tylko jest mowa co daje api
  9. Witam, mam prośbę ogromną ponieważ chciałbym dodać ilość od 1 do 10 za moba o nazwie: "&7Umarly Rycerz &3EXP 0" który miałby być szkieletem lecz nie umiem rozkminić jak to zrobić więc proszę o pomoc. Dorzucam linijki kodu na których próbowałem coś robic (chciałbym powiedzieć ze odhaszowanie nie dało efektu) # if has custom name test give another amount of xp # you can still use color codes on entity just not use it here # This can be used for custom mobs # match string of customName # supports PlaceholderAPI #name: # 'test': # min: 7 # max: 7 a to cały plik .yml # # # PvPLevels # # by # # MathiasMC # # Any ideas for the plugin or need help? # # contact me on spigot # # # # Check for updates on startup? update-check: true # Check for blocks and get xp if type found. (disable block break, place event) (Require server restart) blocks: true # Group setup player is automatic set to group # if has permission on join # Case sensitive and must be found in levels.yml # Works from top to bottom # Best group should be at top # Example: # master: pvplevels.group.master # vip: pvplevels.group.vip # default: pvplevels.group.default # if you have permission on join, you get vip # but if has master permission you will get master group groups: default: pvplevels.group.default vip: pvplevels.group.vip vip+: pvplevels.group.vip+ svip: pvplevels.group.svip svip+: pvplevels.group.svip+ # Stop multiplier on quit? multiplier-quit: true # Worlds section # Disable getting stats in worlds in thís list worlds: - world_nether # Instant death on certain y level instant-death: # Use? (Require server restart) use: false # Respawn instant? respawn: false # Y-value for death y: -1 # Database settings mysql: use: false host: localhost port: 3306 database: database username: username password: password # Get latest data on player join # Used to sync cached data across multiple servers # Recommended setting is 1-10 to be sure the other servers has updated data before getting new data # If using SQLite or one server set to 0 # Seconds. update: 2 # Save to the database every x amount of times got xp # Recommended setting 3-20 save: 5 # Automatically remove inactive players from the database (remove section to disable) purge: # How often to check the activity of players? Seconds. interval: 7200 # Check on server startup? check-on-startup: true # How many days a player must be offline to remove him from the database. inactive-days: 30 # Additional commands that will be executed along with the purge. It may # be useful for deleting player data from a databases of other plugins. commands: [] # Stop players from farming xp from killing the same player. kill-session: use: true # Amount of times a player must kill another player to get in the kill session. amount: 4 # Amount of time (in seconds) a player is in the kill session. time: 150 get: - 'pvplevels message {player} &aOtrzymales {xp_type} EXPA &b(&2pvplevels_xp%/%pvplevels_xp_required%&b)' abuse: - '' remove: - '' top: name: '&cNone' value: '&cNone' excluded: - uuid # Update top map every x amount of seconds. (300 = 5 minutes) update: 300 xp-progress-style: xp: symbol: \u007c color: '&2' none: symbol: \u007c color: '&c' amount: 10 xp-progress-style-2: xp: symbol: \u007c color: '&2' none: symbol: \u007c color: '&c' amount: 20 # Start level of new players (Require server restart) start-level: 1 # List of players that will not get kills/deaths/xp excluded: - uuid # List of entity names you cannot get xp from spawners: - zombie # Generate command generate: # Set to false if you have a level setup finished so you cannot by accident erase the levels.yml use: true # Start xp of level system start: 75 # This is for {random} placeholder # You can also use [min_max] to calculate random number while calculations is running. random: min: 1 max: 2 # The math used to calculate xp math: '{lastXP} + [50_800] * {random}.{level}' percent: # If under or equal percent use that for inserting. (you can add more if you want) (Must contain 100) 20: prefix: '&7[&b{group}&7] &7[&b{level}&7]' suffix: '' group: 'Bad' execute: '{group}' 50: prefix: '&7[&b{group}&7] &7[&b{level}&7]' suffix: '' group: 'Better' execute: '{group}' 80: prefix: '&7[&b{group}&7] &7[&b{level}&7]' suffix: '' group: 'Good' execute: '{group}' 100: prefix: '&7[&b{group}&7] &7[&b{level}&7]' suffix: '' group: 'Pro' execute: '{group}' get: - 'pvplevels message {player} &aOtrzymales {xp_get} EXPA! &b(&2%pvplevels_xp_progress_style%&b)' item: - 'pvplevels message {player} &7[&f&lP&b&lL&7] &f&l» &7Item multiplier &bx{xp_item} &7was applied.' - 'pvplevels message {player} &aOtrzymales {xp_type} EXPA! &b(&2pvplevels_xp%/%pvplevels_xp_required%&b)' boost: - 'pvplevels message {player} &7[&f&lP&b&lL&7] &f&l» &7Multiplier &bx{xp_multiplier} &7was applied.' - 'pvplevels message {player} &7[&f&lP&b&lL&7] &f&l» &7You have killed &b{xp_type} &7and received &b{xp_get} &7xp.' both: - 'pvplevels message {player} &7[&f&lP&b&lL&7] &f&l» &7Multiplier &bx{xp_multiplier} &7and Item multiplier &bx{xp_item} &7was applied.' - 'pvplevels message {player} &7[&f&lP&b&lL&7] &f&l» &7You have killed &b{xp_type} &7and received &b{xp_get} &7xp.' lose: - 'pvplevels message {player} &7[&f&lP&b&lL&7] &f&l» &7You have lost &b{xp_lost} &7xp.' up: - 'pvplevels broadcast null &7[&f&lP&b&lL&7] &f&l» &b{player} &7has leveled up to Level &b{level_next}&7!' - 'pvplevels message {player} &7[&f&lP&b&lL&7] &f&l» &7You have killed &b{xp_type} &7and received &b{xp_get} &7xp.' down: - 'pvplevels message {player} &7[&f&lP&b&lL&7] &f&l» &7You have lost a level and now at Level &b{level}&7.' # This section is for inserting commands into a specific level (if it contains) and a name for the execute group must be unique. levels: 20: up: - 'pvplevels message {player} &7[&f&lP&b&lL&7] &f&l» &7You have leveled up to Level &b{level_next}&7.' - 'pvplevels broadcast null &7[&f&lP&b&lL&7] &f&l» &b{player} &7has leveled up to Level &b{level_next}&7!' down: - 'pvplevels message {player} &7[&f&lP&b&lL&7] &f&l» &7You have lost a level and now at Level &b{level}&7.' execute: '{group}{level}' 60: up: - 'pvplevels message {player} &7[&f&lP&b&lL&7] &f&l» &7You have leveled up to Level &b{level_next}&7.' - 'pvplevels broadcast null &7[&f&lP&b&lL&7] &f&l» &b{player} &7has leveled up to Level &b{level_next}&7!' down: - 'pvplevels message {player} &7[&f&lP&b&lL&7] &f&l» &7You have lost a level and now at Level &b{level}&7.' execute: '{group}{level}' xp: default: # lowercase entity names # You can use worlds, items, name in all types here player: # Get more xp with an specific item (PlaceholderAPI support) #items: # bow: # name: '&eBow' # lores: # - '&aTest lore' # min: 5 # max: 10 # iron_sword: # name: '&eIron Sword' # lores: # - '&aTest lore' # min: 5 # max: 10 # if has custom name test give another amount of xp # you can still use color codes on entity just not use it here # This can be used for custom mobs # match string of customName # supports PlaceholderAPI #name: # 'test': # min: 7 # max: 7 min: 3 max: 15 # Another amount depend on world world: min: 1 max: 4 world_nether: min: 5 max: 10 # xp lose, remove this section to disable. xp-lose: min: 6 max: 20 # Another amount depend on world world: min: 1 max: 4 world_nether: min: 5 max: 10 # All is used if not found other xp-lose use this (remove all section to disable) all: xp-lose: min: 2 max: 2 # If you dont use you can just remove this section. kills: default: get: [] 5: - 'pvplevels message {player} &7[&f&lP&b&lL&7] &f&l» &7You have reached &b5 &7kills.' 10: - 'pvplevels message {player} &7[&f&lP&b&lL&7] &f&l» &7You have reached &b10 &7kills.' # If you dont use you can just remove this section. deaths: default: only-player: false player: - 'pvplevels message {player} &7[&f&lP&b&lL&7] &f&l» &b{source} &7has murdered you!' - 'pvplevels reset killstreak {player}' other: - '' - '' # If you dont use you can just remove this section. killstreak: default: get: [] 5: top: - 'pvplevels broadcast null &7[&f&lP&b&lL&7] &f&l» &b{player} &7got a top killstreak of &b5&7.' get: - 'pvplevels message {player} &7[&f&lP&b&lL&7] &f&l» &7You have reached a killstreak of &b5&7.' lost: - 'pvplevels message {player} &7[&f&lP&b&lL&7] &f&l» &7You have lost a killstreak of &b{killstreak} &7from &b{source}&7.' 10: top: - 'pvplevels broadcast null &7[&f&lP&b&lL&7] &f&l» &b{player} &7got a top killstreak of &b10&7.' get: - 'pvplevels message {player} &7[&f&lP&b&lL&7] &f&l» &7You have reached a killstreak of &b10&7.' lost: - 'pvplevels message {player} &7[&f&lP&b&lL&7] &f&l» &7You have lost a killstreak of &b{killstreak} &7from &b{source}&7.'
  10. Witam, ostatnio próbując napisać plugin napotkałem taki problem. Oto logi z konsoli: Could not load 'plugins\EXPMOB.jar' in folder 'plugins' org.bukkit.plugin.InvalidPluginException: Unsupported API version 1.15.2 at org.bukkit.craftbukkit.v1_15_R1.util.CraftMagicNumbers.checkSupported(CraftMagicNumbers.java:270) ~[spigot.jar:git-Spigot-a99063f-8731c97] at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:131) ~[spigot.jar:git-Spigot-a99063f-8731c97] at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:394) ~[spigot.jar:git-Spigot-a99063f-8731c97] at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:301) [spigot.jar:git-Spigot-a99063f-8731c97] at org.bukkit.craftbukkit.v1_15_R1.CraftServer.loadPlugins(CraftServer.java:353) [spigot.jar:git-Spigot-a99063f-8731c97] at org.bukkit.craftbukkit.v1_15_R1.CraftServer.reload(CraftServer.java:833) [spigot.jar:git-Spigot-a99063f-8731c97] at org.bukkit.Bukkit.reload(Bukkit.java:620) [spigot.jar:git-Spigot-a99063f-8731c97] at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:27) [spigot.jar:git-Spigot-a99063f-8731c97] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) [spigot.jar:git-Spigot-a99063f-8731c97] at org.bukkit.craftbukkit.v1_15_R1.CraftServer.dispatchCommand(CraftServer.java:723) [spigot.jar:git-Spigot-a99063f-8731c97] at org.bukkit.craftbukkit.v1_15_R1.CraftServer.dispatchServerCommand(CraftServer.java:708) [spigot.jar:git-Spigot-a99063f-8731c97] at net.minecraft.server.v1_15_R1.DedicatedServer.handleCommandQueue(DedicatedServer.java:443) [spigot.jar:git-Spigot-a99063f-8731c97] at net.minecraft.server.v1_15_R1.DedicatedServer.b(DedicatedServer.java:407) [spigot.jar:git-Spigot-a99063f-8731c97] at net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:984) [spigot.jar:git-Spigot-a99063f-8731c97] at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:824) [spigot.jar:git-Spigot-a99063f-8731c97] at java.lang.Thread.run(Unknown Source) [?:1.8.0_301] i plik yaml: name: "EXP" version: 1.0 main: me.paczka.ExpRpg.Main api-version: 1.15.2 dodam tylko ze zmiana api-version: 1.15 tylko pogarsza problem
  11. Ok zainstalowałem JDK 8 ale niby wszystko jest ok ale jednak event pomimo że dobrze napisany to nie działa
  12. Nic nie pisze
  13. Mam właśnie zainstalowane
  14. Witam, mam problem ponieważ na samym początku pisania pluginu mam problem z plikiem plugin.yml i pomimo że w samym eclipse nie ma błędów to w konsoli są załączam kod z eclipse oraz logi. LOGI: Plugin RPG v0.1 does not specify an api-version. [21:49:02] [Server thread/ERROR]: Could not load 'plugins\RPG.jar' in folder 'plugins' org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: com/ziomalshoot/Test/Main has been compiled by a more recent version of the Java Runtime (class file version 59.0), this version of the Java Runtime only recognizes class file versions up to 52.0 at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:137) ~[craftbukkit.jar:git-Bukkit-8160e29] at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:333) ~[craftbukkit.jar:git-Bukkit-8160e29] at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:253) ~[craftbukkit.jar:git-Bukkit-8160e29] at org.bukkit.craftbukkit.v1_15_R1.CraftServer.loadPlugins(CraftServer.java:349) ~[craftbukkit.jar:git-Bukkit-8160e29] at org.bukkit.craftbukkit.v1_15_R1.CraftServer.reload(CraftServer.java:785) ~[craftbukkit.jar:git-Bukkit-8160e29] at org.bukkit.Bukkit.reload(Bukkit.java:576) ~[craftbukkit.jar:git-Bukkit-8160e29] at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:27) ~[craftbukkit.jar:git-Bukkit-8160e29] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:148) ~[craftbukkit.jar:git-Bukkit-8160e29] at org.bukkit.craftbukkit.v1_15_R1.CraftServer.dispatchCommand(CraftServer.java:690) ~[craftbukkit.jar:git-Bukkit-8160e29] at net.minecraft.server.v1_15_R1.PlayerConnection.handleCommand(PlayerConnection.java:1606) ~[craftbukkit.jar:git-Bukkit-8160e29] at net.minecraft.server.v1_15_R1.PlayerConnection.a(PlayerConnection.java:1460) ~[craftbukkit.jar:git-Bukkit-8160e29] at net.minecraft.server.v1_15_R1.PacketPlayInChat.a(SourceFile:36) ~[craftbukkit.jar:git-Bukkit-8160e29] at net.minecraft.server.v1_15_R1.PacketPlayInChat.a(SourceFile:9) ~[craftbukkit.jar:git-Bukkit-8160e29] at net.minecraft.server.v1_15_R1.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:19) ~[craftbukkit.jar:git-Bukkit-8160e29] at net.minecraft.server.v1_15_R1.TickTask.run(SourceFile:18) [craftbukkit.jar:git-Bukkit-8160e29] at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeTask(SourceFile:144) [craftbukkit.jar:git-Bukkit-8160e29] at net.minecraft.server.v1_15_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) [craftbukkit.jar:git-Bukkit-8160e29] at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeNext(SourceFile:118) [craftbukkit.jar:git-Bukkit-8160e29] at net.minecraft.server.v1_15_R1.MinecraftServer.ba(MinecraftServer.java:876) [craftbukkit.jar:git-Bukkit-8160e29] at net.minecraft.server.v1_15_R1.MinecraftServer.executeNext(MinecraftServer.java:869) [craftbukkit.jar:git-Bukkit-8160e29] at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeAll(SourceFile:103) [craftbukkit.jar:git-Bukkit-8160e29] at net.minecraft.server.v1_15_R1.MinecraftServer.sleepForTick(MinecraftServer.java:852) [craftbukkit.jar:git-Bukkit-8160e29] at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:793) [craftbukkit.jar:git-Bukkit-8160e29] at java.lang.Thread.run(Unknown Source) [?:1.8.0_281] Caused by: java.lang.UnsupportedClassVersionError: com/ziomalshoot/Test/Main has been compiled by a more recent version of the Java Runtime (class file version 59.0), this version of the Java Runtime only recognizes class file versions up to 52.0 at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_281] at java.lang.ClassLoader.defineClass(Unknown Source) ~[?:1.8.0_281] at java.security.SecureClassLoader.defineClass(Unknown Source) ~[?:1.8.0_281] at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:142) ~[craftbukkit.jar:git-Bukkit-8160e29] at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:92) ~[craftbukkit.jar:git-Bukkit-8160e29] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_281] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_281] at java.lang.Class.forName0(Native Method) ~[?:1.8.0_281] at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_281] at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:60) ~[craftbukkit.jar:git-Bukkit-8160e29] at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:133) ~[craftbukkit.jar:git-Bukkit-8160e29] ... 23 more A tutaj kod z eclipse: Main.java: package com.ziomalshoot.Test; import org.bukkit.Bukkit; import org.bukkit.Color; import org.bukkit.plugin.java.JavaPlugin; public class Main extends JavaPlugin{ public void onEnable(){ Bukkit.getConsoleSender().sendMessage(Color.AQUA+"SERVER IS ACTIVE!"); } } Plik plugin.yml: main: com.ziomalshoot.Test.Main name: RPG version: "0.1" api: "1.15"
  15. Witam, Ostatnio bawiłem się w tworzenie plików i mam problem ponieważ w poniższym kodzie jest stworzony plik o nazwie "nick gracza-EXP" i problem jest bo nie wiem jak odczytać odczytać zmienną z tego pliku i jak zrobić aby dodać do tej zmiennej 5 podczas jakiegoś eventu np zabicia jak na dole kodu. Z góry dziękuję za odpowiedź. import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.entity.EntityDeathEvent; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.plugin.java.JavaPlugin; public class Main extends JavaPlugin implements Listener{ public void onEnable() { Bukkit.getConsoleSender().sendMessage(ChatColor.AQUA+"SERVER RPG IS ENABLE!"); getServer().getPluginManager().registerEvents(this, this); } @EventHandler(priority = EventPriority.NORMAL) public void DamageEntity(PlayerJoinEvent e) { Player p = (Player) e.getPlayer(); File expFile = new File("plugins/KrystusRPG/Gracze-EXP/"+p.getName()+"-EXP"+".yml"); YamlConfiguration yamlFile = YamlConfiguration.loadConfiguration(expFile); if (yamlFile.get(".EXP")==null); yamlFile.set(".EXP", yamlFile.getInt(p.getName()+".Doswiadczenie(EXP)")+0); try { yamlFile.save(expFile); }catch(IOException e1) { e1.printStackTrace(); } } public void DeathEXP(EntityDeathEvent e) { Player p = (Player) e.getEntity().getKiller(); } } na dole jest tylko kawałek kodu ponieważ w tym miejscu się zatrzymałem.
×
×
  • Dodaj nową pozycję...