Plugin 1.7.9->1.8.7

Discussion in 'Plugin Development' started by To175, Oct 29, 2015.

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

    To175

    Hello, can't find how to update my plugin, help please
     
  2. Offline

    Scimiguy

    @To175
    Change what your Build environment is referring to (using a 1.8 build, rather than your current 1.7.10), check for errors.
    Fix errors.
     
    Konato_K likes this.
  3. Offline

    To175

    Thanks I know :)
    Pleaaaase give me the 1.8 build :D I need it :3
     
  4. Offline

    timtower Administrator Administrator Moderator

    You get it the same way as you get your CraftBukkit jar
     
  5. Offline

    To175

    It was a long time ago... I can't remember :/ anybody have 1.8 MP me please :) or post here
     
  6. Offline

    timtower Administrator Administrator Moderator

    @To175 So you forgot about buildtools? Within months?
     
  7. Offline

    To175

  8. Offline

    timtower Administrator Administrator Moderator

  9. Offline

    To175

    Thanks it works with the link I had (Maverick)
    Craftbukkit is for the server and Bukkit for the plugin ?
     
  10. Offline

    timtower Administrator Administrator Moderator

    @To175 Yes, Bukkit is the API
     
  11. @To175
    Bukkit is the API and CraftBukkit is the official extension of it using official Minecraft Server code.
     
  12. Offline

    To175

    Thanks :)
    I used a 1.8.8 build And I removed the old bukkit. I have only errors on this :
    TileEntityChest chest = (TileEntityChest) ((CraftWorld)

    "TileEntityChest cannot be resolved to a type" How to do please ?
    Because of I put "TileEntity" Then it sais "CraftWorld" is not good...
     
  13. Offline

    timtower Administrator Administrator Moderator

    @To175 Why are you using those anyways?
     
  14. Offline

    To175

    Those what ? I need to locate chest, rename, see the name etc...

    Omg... I have
    [Server thread/ERROR] : Could not pass event InventoryCreativeEvent to Myplugin v1
    With every event !

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Oct 29, 2015
  15. Offline

    timtower Administrator Administrator Moderator

    Those nms classes, use Location, Chest, etc instead, no need for nms here.
     
  16. Offline

    To175

  17. Offline

    timtower Administrator Administrator Moderator

    @To175 And why can't you use Chest.getInventory then?
    What is this plugin doing what requires NMS? In words, not in code.
     
  18. Offline

    To175

    Blocks don't have an ItemMeta to store things like display name or lore. Only TileEntities (like chests) can save additional data (e.g. their inventory) and thus they (and only they) can store their display name. However I think it's not possible to get/set this without using nms.
     
  19. Offline

    timtower Administrator Administrator Moderator

    @To175 Then you need to build on CraftBukkit instead.
    You should have known that when you have worked with NMS before.
     
  20. Offline

    To175

    I had the bukkit build before... :/
    You mean i have to replace bukkit=>craftbukkit in my build path ?
     
  21. Offline

    timtower Administrator Administrator Moderator

    Bukkit doesn't contain NMS, so that is pretty impressive.
    Yes
     
  22. Offline

    To175

    It worked before... I have Bukkit, commons-io, essentials, son-lib, permissionsEX, spigot, vault in my build path

    I remove bukkit or just add craftbukkit after bukkit ?
     
  23. Offline

    timtower Administrator Administrator Moderator

  24. Offline

    To175

    Craftbukkit contains bukkit ? :eek:

    Done. Ho it works :eek: However "CraftWorld cannot be resolved to a type"
    And "The method getInventoryName() is undefined for the type TileEntityChest"


    but "TileEntityChest" is ok :D

    + why do I have errors with all EVENTS in my console when I compile ?
     
    Last edited: Oct 29, 2015
  25. Offline

    timtower Administrator Administrator Moderator

    @To175 CraftWorld: Fix the imports! That is NMS.
    And I don't know, I have no idea what you are doing with your events.
     
  26. Offline

    To175

  27. Offline

    timtower Administrator Administrator Moderator

    @To175 Because the version in your server and in your eclipse aren't the same.
    And what does your IDE say? What imports do you have?
     
  28. Offline

    To175

    I put the same CraftBukkit file both in server and in eclipse
    I don't have 1.8.7 for Eclipse but one provide by my host for the server !
    I put 1.8.8 I had with BuildTools in my server, The server do not want to restart :/

    Code:
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.net.URL;
    import java.net.URLConnection;
    import java.text.SimpleDateFormat;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.Collections;
    import java.util.Date;
    import java.util.HashMap;
    import java.util.List;
    import java.util.Random;
    import java.util.Set;
    
    import net.milkbowl.vault.economy.Economy;
    //import net.minecraft.server.v1_7_R4.TileEntityChest;
    //import net.minecraft.server.v1_8_R3.TileEntity;
    
    import net.minecraft.server.v1_8_R3.TileEntityChest;
    
    import org.bukkit.Bukkit;
    import org.bukkit.ChatColor;
    import org.bukkit.Location;
    import org.bukkit.Material;
    import org.bukkit.World;
    import org.bukkit.block.Block;
    import org.bukkit.block.Sign;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.configuration.file.FileConfiguration;
    import org.bukkit.configuration.file.YamlConfiguration;
    //import org.bukkit.craftbukkit.v1_7_R4.CraftWorld;
    import org.bukkit.enchantments.Enchantment;
    import org.bukkit.entity.EntityType;
    import org.bukkit.entity.Player;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.EventPriority;
    import org.bukkit.event.Listener;
    import org.bukkit.event.block.Action;
    import org.bukkit.event.block.BlockBreakEvent;
    import org.bukkit.event.block.SignChangeEvent;
    import org.bukkit.event.entity.PlayerDeathEvent;
    import org.bukkit.event.inventory.InventoryClickEvent;
    import org.bukkit.event.player.AsyncPlayerChatEvent;
    import org.bukkit.event.player.PlayerCommandPreprocessEvent;
    import org.bukkit.event.player.PlayerInteractEvent;
    import org.bukkit.event.player.PlayerJoinEvent;
    import org.bukkit.event.player.PlayerQuitEvent;
    import org.bukkit.inventory.Inventory;
    import org.bukkit.inventory.ItemStack;
    import org.bukkit.inventory.ShapedRecipe;
    import org.bukkit.inventory.meta.ItemMeta;
    import org.bukkit.plugin.RegisteredServiceProvider;
    import org.bukkit.plugin.java.JavaPlugin;
    import org.bukkit.scoreboard.DisplaySlot;
    import org.bukkit.scoreboard.Objective;
    import org.bukkit.scoreboard.Score;
    import org.bukkit.scoreboard.Scoreboard;
    import org.bukkit.scoreboard.ScoreboardManager;
    import org.bukkit.util.Vector;
    
    import ru.tehkode.permissions.PermissionUser;
    import ru.tehkode.permissions.bukkit.PermissionsEx;
    
    import com.earth2me.essentials.Essentials;
    import com.earth2me.essentials.User;
     
  29. Offline

    timtower Administrator Administrator Moderator

    What file should that be? I have no idea what you are talking about.

    What message does your IDE give? What quick fix does it give?
    What is in your build path?
     
  30. Offline

    To175

    I put craftbukkit 1.8.8 in build path and in my server, still errors...

    Error is just "CraftWorld cannot be resolved to a type"
    "It worked before... I have Bukkit, commons-io, essentials, son-lib, permissionsEX, spigot, vault in my build path"
     
Thread Status:
Not open for further replies.

Share This Page