Skocz do zawartości

Dadudze

Użytkownik
  • Ilość zawartości

    51
  • Rejestracja

  • Ostatnia wizyta

Informacje

  • Płeć
    Mężczyzna
  • Hobby
    Granie bo nikt mnie nie szanuje
  • Nick w MC
    Dadudze

Metody kontaktu

Ostatnie wizyty

812 wyświetleń profilu

Osiągnięcia Dadudze

Początkujący III

Początkujący III (4/13)

0

Reputacja

  1. Jak zrobić funkcje getNext(), która zwraca String "a" potem b, c itd a potem jest aa, na, ca, da i tak dalej
  2. @yooniks dzięki, a wiesz jaki jest pakiet na wyrzucenie itemu?
  3. Jak wysłać pakiet (ze strony clienta)
  4. Dadudze

    Błąd (Pomocy)

    package me.Dadudze; import java.io.File; import java.io.FileOutputStream; import java.io.InputStream; import java.io.OutputStream; import org.bukkit.Bukkit; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerChatEvent; import org.bukkit.plugin.java.JavaPlugin; @SuppressWarnings("deprecation") public class MainReplace extends JavaPlugin implements Listener { public File ReplaceFile; public static FileConfiguration Replace; public void onEnable() { Bukkit.getPluginManager().registerEvents((Listener) new MainReplace(), this); ReplaceFile = new File(getDataFolder(), "replace.yml"); try { firstRun(); } catch (Exception e) { e.printStackTrace(); } Replace = new YamlConfiguration(); loadYamls(); } private void firstRun() throws Exception{ if(!ReplaceFile.exists()) { ReplaceFile.getParentFile().mkdirs(); copy(getResource("replace.yml"), ReplaceFile); } } private void copy(InputStream in, File file) { try { OutputStream out = new FileOutputStream(file); byte[] buf =new byte[1024]; int len; while((len=in.read(buf))>0) { out.write(buf,0,len); } out.close(); in.close(); } catch (Exception e) { e.printStackTrace(); } } public void saveYamls() { try { Replace.save(ReplaceFile); } catch(Exception e) { e.printStackTrace(); } } public void loadYamls() { try { Replace.load(ReplaceFile); } catch(Exception e) { e.printStackTrace(); } } public void onChat(PlayerChatEvent e) { int int1 = 0; int int2 = 0; String msg = e.getMessage(); for(String replace : Replace.getStringList("replace")) { int1++; for(String replacewith : Replace.getStringList("replaceWith")) { int2++; if(int1 == int2) { msg.replaceAll(replace, replacewith); } } } } }
  5. Dadudze

    Błąd (Pomocy)

    Czemu mam taki błąd? va.lang.IllegalArgumentException: Plugin already initialized! at org.bukkit.plugin.java.PluginClassLoader.initialize(PluginClassLoader.java:123) ~[server.jar:git-PaperSpigot-"8b18730"] at org.bukkit.plugin.java.JavaPlugin.<init>(JavaPlugin.java:66) ~[server.jar:git-PaperSpigot-"8b18730"] at me.Dadudze.dla.Hejtersi.pl.MainReplace.<init>(MainReplace.java:16) ~[?:?] at me.Dadudze.dla.Hejtersi.pl.MainReplace.onEnable(MainReplace.java:22) ~[?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) ~[server.jar:git-PaperSpigot-"8b18730"] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:332) [server.jar:git-PaperSpigot-"8b18730"] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:404) [server.jar:git-PaperSpigot-"8b18730"] at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugin(CraftServer.java:359) [server.jar:git-PaperSpigot-"8b18730"] at org.bukkit.craftbukkit.v1_8_R3.CraftServer.enablePlugins(CraftServer.java:318) [server.jar:git-PaperSpigot-"8b18730"] at org.bukkit.craftbukkit.v1_8_R3.CraftServer.reload(CraftServer.java:769) [server.jar:git-PaperSpigot-"8b18730"] at org.bukkit.Bukkit.reload(Bukkit.java:556) [server.jar:git-PaperSpigot-"8b18730"] at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:25) [server.jar:git-PaperSpigot-"8b18730"] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:143) [server.jar:git-PaperSpigot-"8b18730"] at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchCommand(CraftServer.java:666) [server.jar:git-PaperSpigot-"8b18730"] at net.minecraft.server.v1_8_R3.PlayerConnection.handleCommand(PlayerConnection.java:1189) [server.jar:git-PaperSpigot-"8b18730"] at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:1001) [server.jar:git-PaperSpigot-"8b18730"] at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:45) [server.jar:git-PaperSpigot-"8b18730"] at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:1) [server.jar:git-PaperSpigot-"8b18730"] at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13) [server.jar:git-PaperSpigot-"8b18730"] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_131] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_131] at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44) [server.jar:git-PaperSpigot-"8b18730"] at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:774) [server.jar:git-PaperSpigot-"8b18730"] at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:378) [server.jar:git-PaperSpigot-"8b18730"] at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:713) [server.jar:git-PaperSpigot-"8b18730"] at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:616) [server.jar:git-PaperSpigot-"8b18730"] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131] Caused by: java.lang.IllegalStateException: Initial initialization at org.bukkit.plugin.java.PluginClassLoader.initialize(PluginClassLoader.java:126) ~[server.jar:git-PaperSpigot-"8b18730"] at org.bukkit.plugin.java.JavaPlugin.<init>(JavaPlugin.java:66) ~[server.jar:git-PaperSpigot-"8b18730"] at me.Dadudze.dla.Hejtersi.pl.MainReplace.<init>(MainReplace.java:16) ~[?:?] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_131] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_131] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_131] at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_131] at java.lang.Class.newInstance(Class.java:442) ~[?:1.8.0_131] at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:77) ~[server.jar:git-PaperSpigot-"8b18730"] at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:129) ~[server.jar:git-PaperSpigot-"8b18730"] at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:328) ~[server.jar:git-PaperSpigot-"8b18730"] at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) ~[server.jar:git-PaperSpigot-"8b18730"] at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.java:293) ~[server.jar:git-PaperSpigot-"8b18730"] at org.bukkit.craftbukkit.v1_8_R3.CraftServer.reload(CraftServer.java:767) ~[server.jar:git-PaperSpigot-"8b18730"] ... 17 more
  6. I tak nie działa A poza tym jest oficialny bukkit na 1.8 i essentials na 1.8
  7. ale /minecraft:enchant też nie działa więc to pomoże?
  8. Nie można enchantować na serwerze po komendzie nic się nie dzieje oto błąd z konsoli: java.lang.NoClassDefFoundError: Could not initialize class com.earth2me.essentials.Enchantments at com.earth2me.essentials.MetaItemStack.getEnchantment(MetaItemStack.java:539) ~[Essentials-2.x-SNAPSHOT.jar:?] at com.earth2me.essentials.commands.Commandenchant.run(Commandenchant.java:65) ~[Essentials-2.x-SNAPSHOT.jar:?] at com.earth2me.essentials.commands.EssentialsCommand.run(EssentialsCommand.java:180) ~[Essentials-2.x-SNAPSHOT.jar:?] at com.earth2me.essentials.Essentials.onCommandEssentials(Essentials.java:526) [Essentials-2.x-SNAPSHOT.jar:?] at com.earth2me.essentials.Essentials.onCommand(Essentials.java:401) [Essentials-2.x-SNAPSHOT.jar:?] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) [mc.jar:git-Spigot-21fe707-e1ebe52] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) [mc.jar:git-Spigot-21fe707-e1ebe52] at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchCommand(CraftServer.java:641) [mc.jar:git-Spigot-21fe707-e1ebe52] at net.minecraft.server.v1_8_R3.PlayerConnection.handleCommand(PlayerConnection.java:1162) [mc.jar:git-Spigot-21fe707-e1ebe52] at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:997) [mc.jar:git-Spigot-21fe707-e1ebe52] at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:45) [mc.jar:git-Spigot-21fe707-e1ebe52] at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:1) [mc.jar:git-Spigot-21fe707-e1ebe52] at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13) [mc.jar:git-Spigot-21fe707-e1ebe52] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_91] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_91] at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44) [mc.jar:git-Spigot-21fe707-e1ebe52] at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:715) [mc.jar:git-Spigot-21fe707-e1ebe52] at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [mc.jar:git-Spigot-21fe707-e1ebe52] at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [mc.jar:git-Spigot-21fe707-e1ebe52] at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [mc.jar:git-Spigot-21fe707-e1ebe52] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_91]
  9. Trochę źle się wypowiedziałem chodzi o dodatek dzięki Kuba_2003TV
  10. Witam, czy ma ktoś download EDIT: Dodatku Ponieważ download z tematu nie działa
  11. Dadudze

    Pomocy (YAML)!

    gdzie jest dodawany?
  12. Dadudze

    Pomocy (YAML)!

    A po co? To nic nie da ponieważ skript ma sprawdzać ile jest w pliku!
  13. Dadudze

    Pomocy (YAML)!

    na pewno nie oto chodzi ponieważ wszystko inne normalnie działa
  14. Dadudze

    Pomocy (YAML)!

    Witam, dzisiaj zrobiłem skript ale gdy otwieram menu dropu to w Statystykach wszystko jest <none> a gdy wykopie netherstara to się pojawia ile netherstarów wykopałem i tak samo z pieniędzmi (nie sumą serwera) Oto część w menu: set {minedmoney} to single value "ServerMinedmoney" get of "/plugins/Drop/players.yml" set {minedmoney.%player%} to single value "%player%.Minedmoney" get of "/plugins/Drop/players.yml" set {netherstars} to single value "ServerNetherstars" get of "/plugins/Drop/players.yml" set {netherstars.%player%} to single value "%player%.NetherStars" get of "/plugins/Drop/players.yml" open chest with 4 rows named "&3Drop" to player wait 3 ticks format slot 0 of player with 1 of gold block named "&8###### &cSTATYSTYKI &8######" with lore "&8## &cTwoje:||&8## &cWykopane NetherStary: %{netherstars.%player%}%||&8## &cWykopane Pieniadze: %{minedmoney.%player%}%||&8## &cSerwera:||&8## &cWykopane NetherStary: %{netherstars}%||&8## &cWykopane Pieniadze: %{minedmoney}%" to close a to czesc ktora miała blokować <none>: on script load: delete {minedmoney} set {minedmoney} to single value "ServerMinedmoney" get of "/plugins/Drop/players.yml" if {minedmoney} is not set: set "ServerMinedmoney" to "0" in yaml file "plugins/Drop/players.yml" delete {netherstars} set {netherstars} to single value "ServerNetherstars" get of "/plugins/Drop/players.yml" if {netherstars} is not set: set "ServerNetherstars" to "0" in yaml file "plugins/Drop/players.yml" loop all players: delete {minedmoney} set {minedmoney} to single value "%loop-player%.Minedmoney" get of "/plugins/Drop/players.yml" if {minedmoney} is not set: set "%loop-player%.Minedmoney" to "0" in yaml file "plugins/Drop/players.yml" delete {netherstars} set {netherstars} to single value "%loop-player%.Netherstars" get of "/plugins/Drop/players.yml" if {netherstars} is not set: set "%loop-player%.Netherstars" to "0" in yaml file "plugins/Drop/players.yml" on join: delete {minedmoney} set {minedmoney} to single value "%player%.Minedmoney" get of "/plugins/Drop/players.yml" parsed as number if {minedmoney} is not set: set "%player%.Minedmoney" to "0" in yaml file "plugins/Drop/players.yml" delete {netherstars} set {netherstars} to single value "%player%.Netherstars" get of "/plugins/Drop/players.yml" parsed as number if {netherstars} is not set: set "%player%.Netherstars" to "0" in yaml file "plugins/Drop/players.yml"
×
×
  • Dodaj nową pozycję...