Solved Error With Speed Sugar

Discussion in 'Plugin Help/Development/Requests' started by Darkdestroyerjn, Jan 25, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    Darkdestroyerjn

  2. Offline

    bwfcwalshy Retired Staff

    Moved to Bukkit Alternates.
     
  3. Offline

    Ambamore2000

    What is line 19 in the SugarRush class?

    EDIT; Do you think you could also put the classes in the
    Code:
     syntax on the forums? Pastebin fonts too big for me.
     
  4. Offline

    8jy89hui

    Code:
    if(plugin.getConfig().getBoolean("SugarRush")) ;
    That is your error. It should be (You put a ; at the end of an if)
    Code:
    if(plugin.getConfig().getBoolean("SugarRush")) {
     
  5. Offline

    Darkdestroyerjn

    Hmm I did what u say but I got another error
    New Code:
    Code:
    package me.HubPlugin.Listeners;
    
    import me.HubPlugin.darkdestroyerjn.Main;
    
    import org.bukkit.Material;
    import org.bukkit.entity.Player;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.Listener;
    import org.bukkit.event.block.Action;
    import org.bukkit.event.player.PlayerInteractEvent;
    import org.bukkit.potion.PotionEffect;
    import org.bukkit.potion.PotionEffectType;
    
    public class SugarRush implements Listener{
       
        Main plugin;
          @EventHandler
          public void onPlayerInteract(PlayerInteractEvent e) {
            if(plugin.getConfig().getBoolean("SugarRush")) {
                 if (e.getAction() == Action.RIGHT_CLICK_AIR || e.getAction() == Action.RIGHT_CLICK_AIR) {
                     if (e.getItem().getType() == Material.SUGAR) {
                         Player p = e.getPlayer();
                         p.removePotionEffect(PotionEffectType.SPEED);
                         p.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, Integer.MAX_VALUE, 3));
    
    }
                 }
             }
        }
    }
    
    Error:
    Code:
    [18:47:33 INFO]: Max Entity Collisions: 8
    [18:47:33 INFO]: Custom Map Seeds:  Village: 10387312 Feature: 14357617
    [18:47:33 INFO]: Mob Spawn Range: 4
    [18:47:33 INFO]: Nerfing mobs spawned from spawners: false
    [18:47:33 INFO]: Anti X-Ray: true
    [18:47:33 INFO]:        Engine Mode: 1
    [18:47:33 INFO]:        Hidden Blocks: [14, 15, 16, 21, 48, 49, 54, 56, 73, 74,
    82, 129, 130]
    [18:47:33 INFO]:        Replace Blocks: [1, 5]
    [18:47:33 INFO]: Cactus Growth Modifier: 100%
    [18:47:33 INFO]: Cane Growth Modifier: 100%
    [18:47:33 INFO]: Melon Growth Modifier: 100%
    [18:47:33 INFO]: Mushroom Growth Modifier: 100%
    [18:47:33 INFO]: Pumpkin Growth Modifier: 100%
    [18:47:33 INFO]: Sapling Growth Modifier: 100%
    [18:47:33 INFO]: Wheat Growth Modifier: 100%
    [18:47:33 INFO]: Entity Activation Range: An 32 / Mo 32 / Mi 16
    [18:47:33 INFO]: Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64
    
    [18:47:33 INFO]: Alternative Hopper Ticking: false
    [18:47:33 INFO]: Hopper Transfer: 8 Hopper Check: 8 Hopper Amount: 1
    [18:47:33 INFO]: Random Lighting Updates: false
    [18:47:33 INFO]: Structure Info Saving: true
    [18:47:33 INFO]: Sending up to 5 chunks per packet
    [18:47:33 INFO]: -------- World Settings For [world_nether] --------
    [18:47:33 INFO]: Arrow Despawn Rate: 1200
    [18:47:33 INFO]: Chunks to Grow per Tick: 650
    [18:47:33 INFO]: Clear tick list: false
    [18:47:33 INFO]: Experience Merge Radius: 3.0
    [18:47:33 INFO]: View Distance: 10
    [18:47:33 INFO]: Allow Zombie Pigmen to spawn from portal blocks: true
    [18:47:33 INFO]: Zombie Aggressive Towards Villager: true
    [18:47:33 INFO]: Item Despawn Rate: 6000
    [18:47:33 INFO]: Item Merge Radius: 2.5
    [18:47:33 INFO]: Max Entity Collisions: 8
    [18:47:33 INFO]: Custom Map Seeds:  Village: 10387312 Feature: 14357617
    [18:47:33 INFO]: Mob Spawn Range: 4
    [18:47:33 INFO]: Nerfing mobs spawned from spawners: false
    [18:47:33 INFO]: Anti X-Ray: true
    [18:47:33 INFO]:        Engine Mode: 1
    [18:47:33 INFO]:        Hidden Blocks: [14, 15, 16, 21, 48, 49, 54, 56, 73, 74,
    82, 129, 130]
    [18:47:33 INFO]:        Replace Blocks: [1, 5]
    [18:47:33 INFO]: Cactus Growth Modifier: 100%
    [18:47:33 INFO]: Cane Growth Modifier: 100%
    [18:47:33 INFO]: Melon Growth Modifier: 100%
    [18:47:33 INFO]: Mushroom Growth Modifier: 100%
    [18:47:33 INFO]: Pumpkin Growth Modifier: 100%
    [18:47:33 INFO]: Sapling Growth Modifier: 100%
    [18:47:33 INFO]: Wheat Growth Modifier: 100%
    [18:47:33 INFO]: Entity Activation Range: An 32 / Mo 32 / Mi 16
    [18:47:33 INFO]: Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64
    
    [18:47:33 INFO]: Alternative Hopper Ticking: false
    [18:47:33 INFO]: Hopper Transfer: 8 Hopper Check: 8 Hopper Amount: 1
    [18:47:33 INFO]: Random Lighting Updates: false
    [18:47:33 INFO]: Structure Info Saving: true
    [18:47:33 INFO]: Sending up to 5 chunks per packet
    [18:47:33 INFO]: -------- World Settings For [world_the_end] --------
    [18:47:33 INFO]: Arrow Despawn Rate: 1200
    [18:47:33 INFO]: Chunks to Grow per Tick: 650
    [18:47:33 INFO]: Clear tick list: false
    [18:47:33 INFO]: Experience Merge Radius: 3.0
    [18:47:33 INFO]: View Distance: 10
    [18:47:33 INFO]: Allow Zombie Pigmen to spawn from portal blocks: true
    [18:47:33 INFO]: Zombie Aggressive Towards Villager: true
    [18:47:33 INFO]: Item Despawn Rate: 6000
    [18:47:33 INFO]: Item Merge Radius: 2.5
    [18:47:33 INFO]: Max Entity Collisions: 8
    [18:47:33 INFO]: Custom Map Seeds:  Village: 10387312 Feature: 14357617
    [18:47:33 INFO]: Mob Spawn Range: 4
    [18:47:33 INFO]: Nerfing mobs spawned from spawners: false
    [18:47:33 INFO]: Anti X-Ray: true
    [18:47:33 INFO]:        Engine Mode: 1
    [18:47:33 INFO]:        Hidden Blocks: [14, 15, 16, 21, 48, 49, 54, 56, 73, 74,
    82, 129, 130]
    [18:47:33 INFO]:        Replace Blocks: [1, 5]
    [18:47:33 INFO]: Cactus Growth Modifier: 100%
    [18:47:33 INFO]: Cane Growth Modifier: 100%
    [18:47:33 INFO]: Melon Growth Modifier: 100%
    [18:47:33 INFO]: Mushroom Growth Modifier: 100%
    [18:47:33 INFO]: Pumpkin Growth Modifier: 100%
    [18:47:33 INFO]: Sapling Growth Modifier: 100%
    [18:47:33 INFO]: Wheat Growth Modifier: 100%
    [18:47:33 INFO]: Entity Activation Range: An 32 / Mo 32 / Mi 16
    [18:47:33 INFO]: Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64
    
    [18:47:33 INFO]: Alternative Hopper Ticking: false
    [18:47:33 INFO]: Hopper Transfer: 8 Hopper Check: 8 Hopper Amount: 1
    [18:47:33 INFO]: Random Lighting Updates: false
    [18:47:33 INFO]: Structure Info Saving: true
    [18:47:33 INFO]: Sending up to 5 chunks per packet
    [18:47:33 INFO]: Preparing start region for level 0 (Seed: 8857274854613108081)
    [18:47:34 INFO]: Preparing spawn area: 41%
    [18:47:35 INFO]: Preparing start region for level 1 (Seed: 8857274854613108081)
    [18:47:36 INFO]: Preparing start region for level 2 (Seed: 8857274854613108081)
    [18:47:36 INFO]: [BetterTab] Enabling BetterTab v1.0
    [18:47:36 INFO]: [GravityEconomy] Enabling GravityEconomy v1.0
    [18:47:36 INFO]: [WorldEdit] Enabling WorldEdit v5.5.8
    [18:47:36 INFO]: WEPIF: Using the Bukkit Permissions API.
    [18:47:36 INFO]: [AdminEssentials] Enabling AdminEssentials v2.0
    [18:47:36 INFO]: #########################################
    [18:47:36 INFO]: #          [AdvanceHub]Enabled          #
    [18:47:36 INFO]: #           by Darkdestroyerjn          #
    [18:47:36 INFO]: #                v2.1                   #
    [18:47:36 INFO]: #           No Errors Found             #
    [18:47:36 INFO]: #########################################
    [18:47:36 INFO]: [DarkGroups] Enabling DarkGroups v1.0
    [18:47:36 INFO]: [1v1] Enabling 1v1 v1.0
    [18:47:36 INFO]:   #########################################
    [18:47:36 INFO]: º1#       [1v1]Enabled                    #
    [18:47:36 INFO]: º1#          by Darkdestroyerjn           #
    [18:47:36 INFO]: º1#                v1.0                   #
    [18:47:36 INFO]: º1#           No Errors Found             #
    [18:47:36 INFO]:   #########################################
    [18:47:36 INFO]: [AdvanceHub] Enabling AdvanceHub v4.3.3
    [18:47:36 INFO]: #########################################
    [18:47:36 INFO]: #          [AdvanceHub]Enabled          #
    [18:47:36 INFO]: #           by Darkdestroyerjn          #
    [18:47:36 INFO]: #                v2.2.7                 #
    [18:47:36 INFO]: #           No Errors Found             #
    [18:47:36 INFO]: #########################################
    [18:47:36 WARN]: [AdvanceHub] Default system encoding may have misread config.ym
    l from plugin jar
    [18:47:38 INFO]: [AdvanceHub] About to download a new update: AdvanceHub v2.2.5
    [18:47:38 INFO]: [AdvanceHub] Downloading update: 10% of 37660 bytes.
    [18:47:38 INFO]: [AdvanceHub] Downloading update: 50% of 37660 bytes.
    [18:47:38 INFO]: [AdvanceHub] Downloading update: 90% of 37660 bytes.
    [18:47:38 INFO]: [AdvanceHub] Downloading update: 100% of 37660 bytes.
    [18:47:38 INFO]: [AdvanceHub] Finished updating.
    [18:47:38 INFO]: [Teleport] Enabling Teleport v1.0
    [18:47:38 INFO]: [WorldGuard] Enabling WorldGuard v5.8
    [18:47:38 INFO]: [WorldGuard] (world) TNT ignition is PERMITTED.
    [18:47:38 INFO]: [WorldGuard] (world) Lighters are PERMITTED.
    [18:47:38 INFO]: [WorldGuard] (world) Lava fire is blocked.
    [18:47:38 INFO]: [WorldGuard] (world) Fire spread is UNRESTRICTED.
    [18:47:38 INFO]: [WorldGuard] Loaded configuration for world 'world'
    [18:47:38 INFO]: [WorldGuard] (world_nether) TNT ignition is PERMITTED.
    [18:47:38 INFO]: [WorldGuard] (world_nether) Lighters are PERMITTED.
    [18:47:38 INFO]: [WorldGuard] (world_nether) Lava fire is blocked.
    [18:47:38 INFO]: [WorldGuard] (world_nether) Fire spread is UNRESTRICTED.
    [18:47:38 INFO]: [WorldGuard] Loaded configuration for world 'world_nether'
    [18:47:38 INFO]: [WorldGuard] (world_the_end) TNT ignition is PERMITTED.
    [18:47:38 INFO]: [WorldGuard] (world_the_end) Lighters are PERMITTED.
    [18:47:38 INFO]: [WorldGuard] (world_the_end) Lava fire is blocked.
    [18:47:38 INFO]: [WorldGuard] (world_the_end) Fire spread is UNRESTRICTED.
    [18:47:38 INFO]: [WorldGuard] Loaded configuration for world 'world_the_end'
    [18:47:38 INFO]: [WorldGuard] 0 regions loaded for 'world'
    [18:47:38 INFO]: [WorldGuard] 0 regions loaded for 'world_nether'
    [18:47:38 INFO]: [WorldGuard] 0 regions loaded for 'world_the_end'
    [18:47:38 INFO]: [TabAPI] Enabling TabAPI vB 0.1.15
    [18:47:38 INFO]: Server permissions file permissions.yml is empty, ignoring it
    [18:47:38 INFO]: Done (5.466s)! For help, type "help" or "?"
    [18:47:41 INFO]: UUID of player Darkdestroyerj is 407002e2-5434-49be-975b-f66f1d
    827309
    [18:47:41 INFO]: Darkdestroyerj[/127.0.0.1:23121] logged in with entity id 21 at
    ([world] -567.7328384826438, 72.86512829970259, 955.6543501055618)
    [18:47:44 WARN]: [WorldEdit] No compatible nms block class found.
    [18:47:44 ERROR]: Could not pass event PlayerInteractEvent to AdvanceHub v4.3.3
    org.bukkit.event.EventException
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:299) ~[spigot.jar:git-Spigot-1571]
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:62) ~[spigot.jar:git-Spigot-1571]
            at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.j
    ava:502) [spigot.jar:git-Spigot-1571]
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:487) [spigot.jar:git-Spigot-1571]
            at org.bukkit.craftbukkit.v1_7_R4.event.CraftEventFactory.callPlayerInte
    ractEvent(CraftEventFactory.java:242) [spigot.jar:git-Spigot-1571]
            at org.bukkit.craftbukkit.v1_7_R4.event.CraftEventFactory.callPlayerInte
    ractEvent(CraftEventFactory.java:212) [spigot.jar:git-Spigot-1571]
            at net.minecraft.server.v1_7_R4.PlayerConnection.a(PlayerConnection.java
    :633) [spigot.jar:git-Spigot-1571]
            at net.minecraft.server.v1_7_R4.PacketPlayInBlockPlace.a(SourceFile:60)
    [spigot.jar:git-Spigot-1571]
            at net.minecraft.server.v1_7_R4.PacketPlayInBlockPlace.handle(SourceFile
    :9) [spigot.jar:git-Spigot-1571]
            at net.minecraft.server.v1_7_R4.NetworkManager.a(NetworkManager.java:184
    ) [spigot.jar:git-Spigot-1571]
            at net.minecraft.server.v1_7_R4.ServerConnection.c(ServerConnection.java
    :81) [spigot.jar:git-Spigot-1571]
            at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:7
    31) [spigot.jar:git-Spigot-1571]
            at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:2
    89) [spigot.jar:git-Spigot-1571]
            at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:5
    84) [spigot.jar:git-Spigot-1571]
            at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java
    :490) [spigot.jar:git-Spigot-1571]
            at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:6
    28) [spigot.jar:git-Spigot-1571]
    Caused by: java.lang.NullPointerException
            at me.HubPlugin.Listeners.SugarRush.onPlayerInteract(SugarRush.java:19)
    ~[?:?]
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0
    _20]
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0
    _20]
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1
    .8.0_20]
            at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_20]
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:296) ~[spigot.jar:git-Spigot-1571]
            ... 15 more
    [18:48:19 ERROR]: Could not pass event PlayerInteractEvent to AdvanceHub v4.3.3
    org.bukkit.event.EventException
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:299) ~[spigot.jar:git-Spigot-1571]
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:62) ~[spigot.jar:git-Spigot-1571]
            at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.j
    ava:502) [spigot.jar:git-Spigot-1571]
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:487) [spigot.jar:git-Spigot-1571]
            at org.bukkit.craftbukkit.v1_7_R4.event.CraftEventFactory.callPlayerInte
    ractEvent(CraftEventFactory.java:242) [spigot.jar:git-Spigot-1571]
            at org.bukkit.craftbukkit.v1_7_R4.event.CraftEventFactory.callPlayerInte
    ractEvent(CraftEventFactory.java:212) [spigot.jar:git-Spigot-1571]
            at net.minecraft.server.v1_7_R4.PlayerConnection.a(PlayerConnection.java
    :633) [spigot.jar:git-Spigot-1571]
            at net.minecraft.server.v1_7_R4.PacketPlayInBlockPlace.a(SourceFile:60)
    [spigot.jar:git-Spigot-1571]
            at net.minecraft.server.v1_7_R4.PacketPlayInBlockPlace.handle(SourceFile
    :9) [spigot.jar:git-Spigot-1571]
            at net.minecraft.server.v1_7_R4.NetworkManager.a(NetworkManager.java:184
    ) [spigot.jar:git-Spigot-1571]
            at net.minecraft.server.v1_7_R4.ServerConnection.c(ServerConnection.java
    :81) [spigot.jar:git-Spigot-1571]
            at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:7
    31) [spigot.jar:git-Spigot-1571]
            at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:2
    89) [spigot.jar:git-Spigot-1571]
            at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:5
    84) [spigot.jar:git-Spigot-1571]
            at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java
    :490) [spigot.jar:git-Spigot-1571]
            at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:6
    28) [spigot.jar:git-Spigot-1571]
    Caused by: java.lang.NullPointerException
            at me.HubPlugin.Listeners.SugarRush.onPlayerInteract(SugarRush.java:19)
    ~[?:?]
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0
    _20]
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0
    _20]
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1
    .8.0_20]
            at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_20]
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:296) ~[spigot.jar:git-Spigot-1571]
            ... 15 more
    [18:49:13 ERROR]: Could not pass event PlayerInteractEvent to AdvanceHub v4.3.3
    org.bukkit.event.EventException
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:299) ~[spigot.jar:git-Spigot-1571]
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:62) ~[spigot.jar:git-Spigot-1571]
            at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.j
    ava:502) [spigot.jar:git-Spigot-1571]
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:487) [spigot.jar:git-Spigot-1571]
            at org.bukkit.craftbukkit.v1_7_R4.event.CraftEventFactory.callPlayerInte
    ractEvent(CraftEventFactory.java:242) [spigot.jar:git-Spigot-1571]
            at org.bukkit.craftbukkit.v1_7_R4.event.CraftEventFactory.callPlayerInte
    ractEvent(CraftEventFactory.java:212) [spigot.jar:git-Spigot-1571]
            at net.minecraft.server.v1_7_R4.PlayerConnection.a(PlayerConnection.java
    :633) [spigot.jar:git-Spigot-1571]
            at net.minecraft.server.v1_7_R4.PacketPlayInBlockPlace.a(SourceFile:60)
    [spigot.jar:git-Spigot-1571]
            at net.minecraft.server.v1_7_R4.PacketPlayInBlockPlace.handle(SourceFile
    :9) [spigot.jar:git-Spigot-1571]
            at net.minecraft.server.v1_7_R4.NetworkManager.a(NetworkManager.java:184
    ) [spigot.jar:git-Spigot-1571]
            at net.minecraft.server.v1_7_R4.ServerConnection.c(ServerConnection.java
    :81) [spigot.jar:git-Spigot-1571]
            at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:7
    31) [spigot.jar:git-Spigot-1571]
            at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:2
    89) [spigot.jar:git-Spigot-1571]
            at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:5
    84) [spigot.jar:git-Spigot-1571]
            at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java
    :490) [spigot.jar:git-Spigot-1571]
            at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:6
    28) [spigot.jar:git-Spigot-1571]
    Caused by: java.lang.NullPointerException
            at me.HubPlugin.Listeners.SugarRush.onPlayerInteract(SugarRush.java:19)
    ~[?:?]
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0
    _20]
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0
    _20]
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1
    .8.0_20]
            at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_20]
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:296) ~[spigot.jar:git-Spigot-1571]
            ... 15 more
    >
     
  6. Offline

    8jy89hui

    I believe this is your error:
    Code:
     if (e.getItem().getType() == Material.SUGAR) {
    
    I think the NPE is because it cannot figure out what the "e.getItem" is
    I personally define the Player at the beginning of the event and then do
    Code:
    if (p.getItemInHand() == Material.SUGAR){
    }
     
  7. Offline

    Darkdestroyerjn

    i fond the error it was The boolean
     
  8. Offline

    Darkdestroyerjn

    Is their a way that I can get Boolean to work in diffrend class
     
  9. Offline

    bwfcwalshy Retired Staff

    @Darkdestroyerjn Make it public, pass instance of the class and get the boolean.
     
  10. Offline

    Darkdestroyerjn

    What do u mean
     
  11. Offline

    bwfcwalshy Retired Staff

    @Darkdestroyerjn Make the boolean public, pass instance of the class and initialize it then just do class.boolean.
     
  12. Offline

    Darkdestroyerjn

    So I would do class.getConfig().getboolean("SugarRush")
     
  13. Offline

    nverdier

    @Darkdestroyerjn Well 'class' would have to be an instance of the class extending JavaPlugin, but yes.

    EDIT: Wait, why are you trying to get the config? Use getters.
     
  14. Offline

    Darkdestroyerjn

    What am trying to do is getConfig()getBoolean But it gives me a error
     
  15. Offline

    nverdier

  16. Offline

    Darkdestroyerjn

  17. Offline

    nverdier

  18. Offline

    Darkdestroyerjn

    Anyways I got it to work

    Thanks everyone who help

    EDIT by Timtower: merged posts
     
  19. Offline

    nverdier

    @Darkdestroyerjn Great, glad to be of help, but I would still recommend learning Java.
     
  20. Offline

    Darkdestroyerjn

    I will
     
  21. Offline

    nverdier

Thread Status:
Not open for further replies.

Share This Page