I was first using only getTitle() for this but then found you need to use getView() as well. So i did but I stil can’t get it to work. FYI This is the error : Cannot resolve method ‘getView’ in ‘Inventory’ I tried changing getInventory() for InventoryView() but still the same error but also the Cannot resolve method ‘InventoryView’ in
Tag: bukkit
Letter appears in console output, but shouldn’t. problem with Bukkit.getConsoleSender().sendMessage();
I’m trying to split code in classes. This code is sending to console text with B letter in start of line, but shouldn’t. Code: in ConsoleWrapper.java but if console.sendMessage((“§c[” + pluginName + “]” + msg)); executing in main class, letter B doesn’t appeat in console. output with cw.notify output with console.sendMessage() Answer It’s not recommended to write your own §
Alternatives for TimeUnit.SECONDS.sleep(1); SpigotMC/ SpigotMC event not running
I was trying to make a Minecraft plugin while having this problem, but I thought this would be more of a Java discussion So I tried to make a spawner that would spawn a chicken every second (for testing, it would become every minute when I’m done), but while I was testing the event doesn’t seem to run (because TimeUnit.SECONDS.sleep()
Assigning a TextComponent object differently based on try catch
I’m trying to take a String kd and either assign it to a TextComponent object, or if the string can be parsed into a Double value then assign it to a TextComponent using a DecimalFormat object. I …
Spigot API playSound
So I’m trying to create a minecraft plugin using the spigot api and i’m having lots of fun! I’m trying to make a /play command that plays a music disc to the player. I’ve come across a problem with trying to play the music to the player. I’m using this: player.playSound(player.getLocation(), Sound.MUSIC_DISC_PIGSTEP, 500.0f, 1.0f); this works great, but for some
Bukkit Chat Clickable Buttons
I’m actually coding a plugin, in a command it prompts a confirmation message and I want to click a button (on the chat text) for confirming and cancellating. I don’t like to copying and pasting code from others, and I don’t want to use classes from others too. I am trying to use TextComponents but I can’t make it work.
PlayerChatTabCompleteEvent deprecated in Spigot 1.16.1
I could not find a replacement for the deprecated PlayerChatTabCompleteEvent that is deprecated in the newest Spigot 1.16.1 Version. I already checked the docs, but could not find anything related to that. And no, I don’t want to use a @SuppressWarnings(“deprecation”) at the beginning of my event. Answer There is no replacement. Since 1.13 the client does not tell the
Repeating Task In Java
I need to repeat a task every 5 seconds in java, I’m creating a minecraft bukkit / spigot Plugin, so doing it with Java or using the bukkit api would both work great. Code: Thanks for the help! Answer You can do what is called scheduling a repeating task, this example was pulled from the Bukkit forums. Simply edit the
error: Class is not abstract and does not override abstract method
Well, I’m trying to compile a java plugin for Bukkit/Spigot, but I’m getting the following error: The respective parts of the file where’s the error (I mean): And this: The plugin ins’t mine, but I need to compile with the correct version of spigot. The problem is that I don’t know much about java to solve this error. Can anyone
Check how many people are within a certain distance from the center
I’m making a Spleef plugin. I need to count the amount of people in a lobby. I thought that I could count how many people are within a certain distance from the center of the lobby. I think that this may work better than recording when someone types the command. Main.java: playerJoinedGame.java: I have not called the onPlayerJoin method from