Skip to content

Tag: bukkit

Trying to get getView().getTitle() to work

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 err…

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.ge…

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 TextComponen…

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. …

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 …