#help-archived
1 messages · Page 160 of 1
Is there a way to get a users username based on their UUID?
mojang api
Online or offline?
Bukkit.getPlayer(uuid).getName()
kk
Is there an API to create clickable messages? Aka send a message to a player which will, if clicked, execute a command?
Awesome, thanks a bunch, I'll check it out
Can be used with player.spigot.sendMessage
TextComponent
is clearlagg helpful?
Anyone know how to use NMS in travis ci builds? I'm guessing you run BuildTools for each version being used but how do you cache the repos and prevent them it from running BuildTools every commit?
Can you get a past skin from a user?
let's say i want the player skull of a user. I want his previous skin. Is there a way to get it?
i don't mess with UUID that much so idk
@crimson sandal you can't really it's quite difficult
You can try run build tools hope it installs to maven correctly then build
for some reason skeletons and zombies without head armor in clear weather during the day are not burning up
anybody have this issue?
Hi, is there a resource section in the forums to publish bungeecord forks? Because last time i checked i didn't found any
what would you recommend to host around 150 players?
depends on what you plan to run on your server
Factions, with around 50 plugins
On the PlayerFishEvent, how can I tell if a player has hooked an item on the ground or gotten it out of the water? Is there any way other than tracking who has their hook in water?
@old barn 4 cores 3 ghz 2gb ram depends on the plugins tho i run fully custom and optimized on ram usage so i dont have to assign much
VPS?
as i said, 4 cores with 3ghz or better 2gb ram or more
vps tends to have less ghz than dedicated which is bad for minecraft hosting
and make sure your hosting has antiddos and + 500mbps bandwidth
Do you have a dedicated one?
Is there a lot of price difference for a vps?
yes
vps is cheap but is trash
dedicated is expensive but really worth it
if it is a serious project and you are going to invest your money get a dedicated
OVH
Do you recommend me where I can buy a dedicated one?
^^
I use Hetzner for testing (testing ONLY, the have bad ddos prot) then go to OVH or so you start depending on how much ddos prot or performance I need for production.
When installing a minecraft server on dedicated, is it difficult?
And screens.
if you want to run different instances you can use screens
On the PlayerFishEvent, how can I tell if a player has hooked an item on the ground or gotten it out of the water? Is there any way other than tracking who has their hook in water?
btw from earlier ^^
Create or enter a screen
screen -x <nameofscreen>
Leave a screen
control + a + d
Remove a screen
screen -k <nameofscreen>
screens are like windows were you have different "console terminals"
but they arent really windows
Hmm how come BuildTools isn't installing CraftBukkit 1.16.1 to my local maven repo?
And this dedicated, would it support a bungeecoord?
yes
I'm new to this, would you recommend a website to buy a dedicated one?
@bright forge Have I seen your server, does your dedicated handle the entire server, or do you have more than one dedicated?
I have only one dedicated
but remember that i code my own plugins
so i can run a bunch of stuff
because its prepared and optimized to my likes
some servers prefer using more ram to prevent cpu usage
others prevent using less ram and more cpu
and me i prefer having a middle ground
Cache it all. Yum
I've already looked.
Caught entity is for hooking anything that is already spawned
I only accept CAUGHT_FISH and CAUGHT_ENTITY for catching fish and enchant books.
Caught entity is for hooking anything that is already spawned
from my testing not at least.
I mean that’s what it says
public static final PlayerFishEvent.State CAUGHT_ENTITY
When a player has successfully caught an entity. This refers to any already spawned entity in the world that has been hooked directly by the rod.
Hmm. wtf lol
Wait, caught_fish isn't necessarily a fish loll
Ok, thx. My code should be good now.
[ERROR] Failed to execute goal on project ChestsPlusPlus-Master: Could not resolve dependencies for project com.jamesdpeters.minecraft.chests:ChestsPlusPlus-Master:jar:1.5-BETA-3: Failure to find org.spigotmc:plugin-annotations:jar:1.2.3-SNAPSHOT in https://oss.sonatype.org/content/repositories/snapshots/ was cached in the local repository, resolution will not be reattempted until the update interval of sonatype-snapshots has elapsed or updates are forced -> [Help 1]
``` Anyone any idea what's causing this on my travis build? Hmm
Is there a way to reopen an issue on Jira?
Hi friends, is the spigot documentation down? I was able to load everything yesterday but now I keep getting 404 error for all members pages
@hardy cedar You can try
java Bukkit.getScheduler().scheduleSyncDelayedTask(<plugin>, <Runnable>, <timeInTickToDelay>);
@lofty meadow didn't work :/
Did I sent you a further message below it?
It doesn't even work on eclipse lop
Lol*
I mean by that
The runnuable field
0of my internet took time to send that
At <Runnable> do 'new Runnable() {...}' and then you will get an @Overwite funtion, everything in than function will run in the next <timeInTickToDelay>
Because my server is getting immense TPS lag from a large chunk and I can't find it.
Your main class
Somebody help I have a large community and my server is unplayable.
Because my server is getting immense TPS lag from a large chunk and I can't find it.
That's weird lol
Did you change the server version
Your now on 1.16
Idk i can't figure out the problem.
There's no info lol.
@lofty meadow i did a public static Plugin plugin
What else can i do
The scoreboard class can't resolve the variable 'plugin'
Oh sweet I just wrote a script that checks the travis cache if BuildTools has already installed craftbukkit. I think I'll make a forum post on it later
im new to spigot what should i download for 1.16
?bt
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
how do i change the lore of an anvil result itemstack?
when you do java config.set("test", itemStack); will it save the NBT?
PrepareAnvilEvent#setResult
Ok fixed this still not working 😒
@hardy cedar Hmm, I don't know
I feel scammed bc of java
public void run() {
p.setScoreboard(b);
}
}, 20L, 3);```
Lol
I did a repeat task
AND wow
Also did not work
Awesome
👍
Not sure setScoreboard is safe to run async
I don't get any errors in the console
Hmm maybe it is then
Not sure why you need to keep setting the board though, just update it
You can just set the score or change team prefixes or whatever without setting the scoreboard again
You can just set the score or change team prefixes or whatever without setting the scoreboard again
Also didn't work
@spiral gale u have a host?
no
@buoyant path it should yes.
@spiral gale so find a good Minecraft host with good rams
“Good rams”
Enough* duuh
CPU is generally more important
I was typing
:(
https://pastebin.com/dA0BpJan @lone fog any idea?
I mean that just sets the same value every time it runs
So of course you won’t see a change
Wdym there is placeholders that doesn't update
Tho
It updates on other action i did with GadgetsMenu
When i open the menu
And it's fine
by setting the scoreboards
So there's no way to fix it
That's just kewl thx java
I mean making a scoreboard plugin isn’t that hard
But I’m not sure what you’ve done for yours
Wanna see the full class
?9
It's not big
That's it
I spammed giving the scoreboard in many different ways
But I’m not sure what you’ve done for yours
I believe that java hates me all that entire time but it doesn't want to show that for anyone 😭 😂 😂 😂
Does my proxy need to point to a public IP? currently have it pointing to a local IP which is port forwarded
Wdym a public ip? Like a domain?
It doesn't matter that much i mean both work right?
U must point to your ipv4
Is there a villager trade event?
i had it pointing to my fqdn but since i got my router i haven't setup a nat hairpin yet so it doesn't work
thus why i need to point it to my local ip
Ok i found some thing confusing me rn
I just found that
When i update the scoreboard
by setting it
It just makes everything (placeholder) 0
even if I updated it
With another event
Lol
My brain cells are destroyed
👍 😂
Hi guys, may I know how I can get the tone number for a noteblock? The getTone() method only returns something like ABCDEF, but I want an integer ranging from 0 to 24. Thanks!
Idk if that's possible but u can do that if the value is ABCDEF u can return it to what ever u want
If it's not
Problem solved by using reflection XD. Thanks anyway bro
Oh xd
how come when i use build tools latest it doesn't install 1.16.1 it creates a 1.15.2 spigot
--rev 1.16.1
why does it not do it with --rev latest
1.15 is still marked as latest until 1.16 is considered stable
where to go for the list of latest spigot updates for build?
https://hub.spigotmc.org/jenkins/
Is that what you're looking for, Noob?
I think so, but looking for a list of what the latest build updated specifically? Already downloaded it, just want to see what exactly is changed from build to build
oo
@frigid ember thank you
Yw
hello
is there any way to check the armor defense attribute immediately after equipping armor? (same tick)
doubt
really annoying how the attributes need a second
to catch up
very hard to just do checks lol
welp
is there an event that fires when a respawn anchor/bed is used, that could be cancelled to prevent an explosion?
or would i need to use BlockExplodeEvent and PlayerInteractEvent independently?
can you grab the armor defense points/toughness from anywhere
is there any plugin that you can hide nametags?
hm, if you mean player name plates you might be able to use packets
also
question about resource packs, gang
I have a resource pack which is set in 1.15.2 and some blocks seem to be bugging out at random
right now it does not seem to have a pattern - the redstone ore and cobblestone wall are the famous pink/black block, and I have not modified the textures or models for either of these
kinda confused as to what i can do as I have not modified anything related to these, is it just some sort of corruption?
you didnt register your listener
Well yes I know that haha
Player player = interact.getPlayer() im finding that weird im used to creating objects by Player player = new player() but it works different when working with this API so basically what is the player reference doing?
Why are you using Swing? xd
I just realized that I must've accidentally imported
How do I remove a # of items from a player's inventory?
Trying to do it with 'player.getInventory().remove(main.getCurrency(amount));'
maybe its removeItem()...
it was removeItem()
I am trying to do a plugin for manhunt, and to test things I created a really simple plugin that just reacts to one command. When I start my server, the console says mapping values are not allowed here, and there is a pointer pointing to the colon after commands. What is wrong?
main:com.steeric.manhunt.Manhunt
name:Manhunt
version:0.0_Alpha
author:Steeric
commands:
test:
spaces after colons?
that´s what i initially thought, but no
add them and for version put in single quotes
oh so you need spaces after colons?
name is usually first
okay, lets try it
also you could add a description: field to the command test
my plugin.yml has name, version, author, main and api-version
you need spaces after colons @stark oxide \
this is not a valid yaml syntax
@inland oxide order doesn't matter
okay, I'll try that too, but now I think it loaded the plugin successfully
yeah, it works now, thanks
How would one color certain sections of a map based on chunks? I want to show my players what chunks they've claimed near them but I'm not sure what they best way to do this would be.
You need to convert the world coordinates to the map coordinates and then render using a MapRenderer
Anyone can help me install java 11 on linux, ubuntu manually? I've done from almost every help on internet, but when I execute command java -version it always say java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory
I tried installing openjdk6, openjdk7, oracle8... But always the same error when I want to execute java, for example with java -version:
java: error while loading shared libraries: libjli.so: ca...
Perhaps that'll be of help?
how would I make "+plugin.counter.Count.get(uuid)+" to a $steps variable for in the config
What?
p.sendMessage(applyCC("&cHello you currently have "+plugin.counter.Count.get(uuid)+"!"));
I want the message to be configurable in the config.yml
but I don't want them to have to say "+plugin.counter.Count.get(uuid)+"
YAML will not be able to execute java methods for you
so you need to read the string from the config, and in that string, have a placeholder that you would replaced with the count when you send the message
Sure - make a custom message. Have it in the config with a placeholder for the info that you want to be in there.
And when you use, it replace the placeholder.
ok ty
@frigid ember dumb question is this even your own source code?
hey I've setup bungeecord and when I type /server it doesnt work but when I type /server <name of any server it works>
I basicly cant see server listing
and I get an error and kicked if I do /server
@frigid ember are you trying to make config placeholder?
basically yes
Use a formatter
Was thinking I might make something that checks the Spigot version
but looks like the VersionCommand stuff doesn't hav an API interface
would be nice to get not only the spigot version, but the the version that is released (not necessarily installed), the number of commits back, and maybe somethign like an isCurrent() method.
That way, in a beta plugin for a new major release like 1.16.x, I could set a warning if they are not on the latest version, etc. and disable that message if the plugin is a release plugin
maybe someone could rewrite VersionCommand to add that functionality to the Spigot API??
ok, well sleep time.
Hi,
is there a tutorial how i can program a pvp bot in minecraft?
I would strongly recommend you learn the basics before attempting to learn how to create a PVP bot.
i can program
What have you tried?
i look up in the spigot forums but i found only a solution where it does not walk
or one from protocollib
but it isn't walking too
like a fake player
or should i use citizens?
Is it possible to transfer spigot data to paper? Like if I want to change my server to paper how will I do that?
I want all the players data to be in paper
A few plugins might (but very few)
yeah
probabily plugins
but it's not something you can't revert
if they wouldn't work propely on paper
So like how? remove spigot jar and put paper jar?
and make backups
oki ty
hey y'all so my email program eowked a few days ago and it's still working
but so many people are joining and i'm adding so many university emails that well, the config file has grown from a fe bytes to 7KB
Should I rewrite the system to do SQL?
yes, yaml
i started it small for testing
then a bunch of people joined and verified their uni
so I want to switch that out.
sweet
yeah i'm planning on that
i'm working on it rn
plus probably going ot learn to maven shade specific plugins
yeah you definetively want to learn how to use Maven
Gradle ffs
maven is easier for noobs
Wouldn’t say that
I'm a noob so I would say that
Hey i can't run data packs on spigot why is that?
does anyone have an up to date guide how to listen to packets?
if I use setDisplayName with 8 or more color sections, the name now resets to the default minecraft name, but this is not documented.
example a: setDisplayName("§ca§9b§cc§9d§ce§9f§cg") -> colored name "abcdefg"
examble b: setDisplayName("§ca§9b§cc§9d§ce§9f§cg§9h") -> "Polished Andesite"
I use chatcolor, but for the sake of the example I wrote it out here.
Any ideas?
but how?
access entityplayer's network manager
if i knew how to do that i wouldnt need a guide
Or, you could use ProtocolLib - they've got an example up on their github I'm pretty sure
thanks, i will look into it
how to check an integer amount that is in config.yml
ConfigurationSection#getInt
am I doing something dumb in the above example, or this a new behavior?
Hi guys, what's the simplest way to allow Players(non-ops) to use a command I have made for my plugin?
(Without using a permissions manager plugin?)
Permissions would be great but otherwise use a map or smtng
If you want only certain players to be allowed
Else just don’t check permission?
I'm kind of new to this, I just have a really simple /swapworld command however currently only ops can use it.
Whenever a non-op runs it they get the default message "I'm sorry, but you do not have permission to perform this command..." etc
Is there a file that I can simply append this command's name "swapworld" to that will allow all users to use it?
How’s your plugin.yml looking
I really don't see why you wouldn't use a permission manager plugin?
That’s irrelevant?
name: JaymaicanSurvival
main: com.jaymaican.jaymaicansurvival.JaymaicanSurvival
version: 1.0
api-version: 1.16
commands:
swapworld:
description: Teleports the player to the other world.
aliases: [sw]
permission: dualworld.swapworld
usage: "Usage: /<command>"
This is for an absolute bare-bones plugin for me and my friends to play. The command simply swaps the player between survival and creative.
THANKYOU!
That should make everyone has permission by default
When i try to spawn firework, i get this exception:
Caused by: java.lang.IllegalArgumentException: Cannot spawn an entity for org.bukkit.entity.Firework
at org.bukkit.craftbukkit.v1_16_R1.CraftWorld.createEntity(CraftWorld.java:1781) ~[paper.jar:git-Spigot-758abbe-2b00831]
at org.bukkit.craftbukkit.v1_16_R1.CraftWorld.spawn(CraftWorld.java:1806) ~[paper.jar:git-Spigot-758abbe-2b00831]
at org.bukkit.craftbukkit.v1_16_R1.CraftWorld.spawn(CraftWorld.java:1393) ~[paper.jar:git-Spigot-758abbe-2b00831]
at org.bukkit.craftbukkit.v1_16_R1.CraftWorld.spawnEntity(CraftWorld.java:645) ~[paper.jar:git-Spigot-758abbe-2b00831]
at net.codingarea.challengesplugin.manager.ServerManager.playEndEffect(ServerManager.java:111) ~[?:?]
at net.codingarea.challengesplugin.manager.ServerManager.handleChallengeEnd(ServerManager.java:86) ~[?:?]
at net.codingarea.challengesplugin.manager.players.ChallengePlayerManager.handlePlayerDeath(ChallengePlayerManager.java:34) ~[?:?]
at net.codingarea.challengesplugin.listener.PlayerDeathListener.onPlayerDeath(PlayerDeathListener.java:34) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_211]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_211]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_211]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_211]
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:315) ~[paper.jar:git-Spigot-758abbe-2b00831]
... 33 more
Code:
for (Player currentPlayer : Bukkit.getOnlinePlayers()) {
currentPlayer.getWorld().spawnEntity(currentPlayer.getLocation(), EntityType.FIREWORK);
}
Only in 1.16
paper
i dont have paper
Is it only me but it has double preconditions annotations rn https://hub.spigotmc.org/javadocs/spigot/org/bukkit/World.html#spawnEntity(org.bukkit.Location,org.bukkit.entity.EntityType)
I've seen that for the longest time, too

Anyone got like a player data reset plugin. Which resets someone’s player data on a server?
So be like /pd reset (player) and resets everything
how would i switch from spigot 1.15.2 to 1.16.1
@steep orbit what you mean reset everything?
Like stats to make it like they’re new
@frigid ember unless the server host provides you a one click install(most should),download the BuildTools,download the 1.16.1 version then ur good to go
Resets inventory stats mcmmo and all that
every plugins has its own stuff,there is no one for all
would you know if mcmyadmin does that
you have to manually do a wipe all for each,if you simply have to wipe the server
Well that’s gonna be pain later on
delete all data folders or simply just delete all folders
Thank you
just be carefull to not delete any config files that you worked on
so you dont have to reconfigure them..
Done that before was pain... but we learn from our mistakes
@frigid ember mcmyadmin?
ahh i see
Well it doesnt provide anywhere on it the possible version,so unless you can choose 1.16 when you install it,then you have to manually do it yourself
you cant choose, its sort of dumb
most host provides(unless theyr mainly minecraft) dont rush updating the versions...
shouldnt rly matter though,its quite easy to get 1.16 and upload it urself
do i just replace the old.jar with the new one
yeah that should work
just be carefull as sometimes plugins break when switched to 1.16
so do a backup before..
Is spigot 1.15.2 development finished?
you mean 1.16?
Like it will stop getting updates
yes
Rip
unless there is like a major bug/exploit it wont rly be touched much
hey anyone know what i am doing wrong?
Manager.class.getResourceAsStream(FILE_PATH);
i have file in plugins folder
Yes Ik what ur doing wrong
what
but in jave you can get file like this
File file = new File(getDataFolder(), "credentials.json");```
Well, File is kinda outdated, you can also use Path which is more to date
But its ur choice
¯_(ツ)_/¯
but why the error tho
What is FILE_PATH
String
There is no reason to use that method lol
/plugins/credentials.json
getResourseAsStream is used for the map resource iirc
this is inside that string
Just use what I've sent
if I recall correctly
I got an async task that pulls data from an SQL DB and puts it into an objectwrapper i made.
this code is run in a function that returns a boolean if a row in a table exists.
problem is the function returns the boolean prior to the async task setting the objectwrapper.
Code:
public boolean tableExists(String table) {
ObjectWrapper<Boolean> exists = new ObjectWrapper<>();
new BukkitRunnable() {
@Override
public void run() {
try {
ResultSet result = metaData.getTables(null, null, table, null);
exists.set(result.next());
} catch (SQLException e) {
e.printStackTrace();
}
}
}.runTaskAsynchronously(plugin);
return exists.get();
}
Anyone knows how to solve this?
@fluid marlin Use CompletableFuture
Whats that
CompletableFuture<Boolean> getBoolean() {
CompletableFuture<Boolean> future = new CompletableFuture<>();
runTaskAsync(() -> {
boolean b = true; // something async
runTask(() -> future.complete(b)); // go back in sync
});
return future; // return future
}
// when using
getBoolean().whenComplete((b, err) -> {
// do stuff
});
ford with the spoon 😂
I couldn't help myself, sorry
i was joking about the google's domain m8
I'm currently reading bout it
but thanks ❤️
CompletableFuture<Boolean> getBoolean() {
CompletableFuture<Boolean> future = new CompletableFuture<>();
runTaskAsync(() -> {
boolean b = true; // something async
runTask(() -> future.complete(b)); // go back in sync
});
return future; // return future
}
// when using
getBoolean().whenComplete((b, err) -> {
// do stuff
});
Or use CompletableFutute#supplyAsync
(Instead of the bukkit scheduler)
hello does anyone here know the Entity Status byte in protocol that makes mobs do there attacking animation. specifically a wither skeleton when he swings his arms to attack (in 1.15.2)
yea ive looked
idk if im blind or somethin
there's a list detailed below but reading through everything i cannot find this darn number
Do you use ProtocolLib?
idk I've never understood how to create packets myself
I think it's difficult to do it without an external library
ive just been spending time reading a lot of resources and tutorials
its a shame there is no real protocollib tutorial series that really opens up to explain a lot of the easy to understand sections
I mean ProtocolLib is way easier to use than NMS and netty\reflection
and then a more in depth based section that goes more into protocol and understanding the different aspects of mc
oh yea for sure
its an amazing library
if (Counter.Count.get(uuid) == this.plugin.getConfig().getInt("stepcommands.steps")) {
System.out.println("stepcommands.commands");
}```
stepcommands:
steps: 10
commands:
- time set night
Im making a configurable config which executes a command after x steps; public static final HashMap<UUID, Integer> Count = new HashMap<>(); This is my hashmap but its not working. Are the parts above right?
the added steps etc are all right and added after walking
may I ask why static
I use it in other classes
what do you mean by "the hashmap is not working"?
no error
Remove all those static to start off with
@naive goblet ok
it just doesnt set it in the console
e9d30742-403e-4726-8b0f-de85903ede35: 19
while my amount is above 10
so it has been on 10
Hello, i coded a Backpack Plugin, but if i try to build it. I get this Error Message and i don't get what i did wrong..
Information:javac 1.8.0_251 was used to compile java sources Information:7/4/2020 15:30 - Build completed with 2 errors and 0 warnings in 1 s 508 ms J:\development\backpack\src\main\java\de\yaquza\backpack\utils\Config.java Error:(39, 20) java: unreported exception java.io.IOException; must be caught or declared to be thrown J:\development\backpack\src\main\java\de\yaquza\backpack\commands\BackpackCommand.java Error:(22, 33) java: non-static method get(java.lang.String) cannot be referenced from a static context
@fossil thorn I guess you missed a try & catch?
wym?
Counter.Count.get(uuid) This will get the Int data of the hashmap right? Fendi
that's what the error is saying
you aren't handling the IOException somewhere in your code
and you are improperly using static methods
Counter.Count.get(uuid) This will get the Int data of the hashmap right? Fendi
@frigid ember it will get the integer associated with the given UUID, if present
otherwise null i think
@sturdy oar could i write you per dm?
[INFO] stepcommands.commands @sturdy oar
got it working but now it doesnt do the path which is logic cuz I print it
How should I print it than xd
stepcommands:
steps: 10
commands:
- time set night
try list.forEach(System.out::printLn)
im printing stepcommands.commands
if i remember correctly, printing a list directly will only result in its memory address or something
someone correct me if I'm wrong
Hello, i coded a Backpack Plugin, but if i try to build it. I get this Error Message and i don't get what i did wrong..
Information:javac 1.8.0_251 was used to compile java sources
Information:7/4/2020 15:30 - Build completed with 2 errors and 0 warnings in 1 s 508 ms
J:\development\backpack\src\main\java\de\yaquza\backpack\utils\Config.java
Error:(39, 20) java: unreported exception java.io.IOException; must be caught or declared to be thrown
J:\development\backpack\src\main\java\de\yaquza\backpack\commands\BackpackCommand.java
Error:(22, 33) java: non-static method get(java.lang.String) cannot be referenced from a static context
Send code
import org.bukkit.configuration.file.YamlConfiguration;
import java.io.File;
import java.io.IOException;
public class Config {
private static File file;
private static YamlConfiguration config;
public Config() {
File dir = new File("./plugins/backpack/");
if(!dir.exists()) {
dir.mkdirs();
}
file = new File(dir, "config.yml");
if(!file.exists()) {
try {
file.createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
}
config = YamlConfiguration.loadConfiguration(file);
}
public static boolean contains(String path) {
return config.contains(path);
}
public static void set(String path, Object value) {
config.set(path, value);
config.save(file);
}
public Object get(String path) {
if(!contains(path)) {
return null;
}
return config.get(path);
}
}
this is my code
Remove all those static to start off with
conclure I need to print the command in stepcommands.commands
;p
stepcommands.commands is a part of config.yml
Remove all those static to start off with
@naive goblet ok
Hey, I'm a Java developer with more than 5 years of experience. I offer you good and performant Spigot and Bungeecord plugins for little money! If you are interested, just write me a direct message on Discord 🙂
how would I print the commands itself
CodeChickrn wrong place
is there a plugin that makes that dirt didn't become grass
worldguard does that JoHe
@naive goblet no they told me i should post it here
Who?
you want to print the array from commands?
Remove all those static to start off with
@naive gobletInformation:java: Errors occurred while compiling module 'plugin' Information:javac 1.8.0_251 was used to compile java sources Information:7/4/2020 16:13 - Build completed with 3 errors and 0 warnings in 4 s 762 ms J:\development\backpack\src\main\java\de\yaquza\backpack\commands\BackpackCommand.java Error:(21, 18) java: non-static method contains(java.lang.String) cannot be referenced from a static context Error:(22, 33) java: non-static method get(java.lang.String) cannot be referenced from a static context Error:(24, 19) java: non-static method set(java.lang.String,java.lang.Object) cannot be referenced from a static context
now i get this error
FileConfiguration#getStringList(String)#forEach(System.out::println)
@fossil thorn did you remove all the static?
@fossil thorn did you remove all the static?
@naive goblet ```package de.yaquza.backpack.commands;
import de.yaquza.backpack.main;
import de.yaquza.backpack.utils.Config;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory;
public class BackpackCommand implements CommandExecutor {
private Inventory inventory;
public BackpackCommand() {
int slots = 27;
if(Config.contains("command.backpack.slots")) {
slots = (int) Config.get("command.backpack.slots");
} else {
Config.set("command.backpack.slots", 27);
}
this.inventory = Bukkit.createInventory(null, slots, "§6Rucksack");
}
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if(sender instanceof Player) {
Player player = (Player)sender;
player.openInventory(inventory);
} else {
sender.sendMessage(main.getPrefix() + ChatColor.RED + "Dieser Befehl kann nur als Spieler ausgeführt werden.");
}
return false;
}
}
That’s another class?
wym
Well you made your config nonstatic so you can’t use those methods as if they still are static
FileConfiguration#getStringList(String)#forEach(System.out::println)
System.out.println(this.plugin.getConfig().getInt("stepcommands.commands"));
what do i have to do?
@frigid ember grass-growth if I well remember
something like that yes
Make an instance of Config by invoking it’s constructor and then pass it to different classes with dependency injection
getInt?
but this prints the indexes of all commands
@frigid ember
Thought you wanted the list lmao
yes I do
then getStringList
just print the list in console
Make an instance of Config by invoking it’s constructor and then pass it to different classes with dependency injection
@naive goblet im sorry, but im new to coding and i don't understand many 😦
Start with learning the basics on sololearn or something @fossil thorn
Did you paste the that lol
It would be in your case plugin.getConfig().getStringList(“commands”).forEach(System.out::println);
uhh
lemme see
real quick
should it be commands or stepcounter.commands? @naive goblet
second
Cya
Hey, my server has continued to crash multiple times and have been directed here by my hosting company, is there any solution to this bug?
Hey, I'm a Java developer with more than 5 years of experience. I offer you good and performant Spigot and Bungeecord plugins for little money! If you are interested, just write me a direct message on Discord 🙂
Not here dude...
https://www.spigotmc.org/forums/services-recruitment-v2.54/ on the forums where people can also check ur history
CodeChicken wth someone told you like 5 min before that this is the wrong channel
Your code may be good and all, but please don't self advertise your services here
hi when i open my server with the .bat, my ports doesn't open. When i open my server with the .jar my ports is open but obly the server have 1g
there isnt rly such a thing a not opening
if i open the server with the .jar all works correct and the ports in open and my friends can play
if i open with the .bat (to have more ram on the server) the ports doesnt open and i only can play offline
my english is really bad
have you done port forwarding?
@sturdy oar yes
What you mean have more ram
You place how much ram it uses
java -Xmx2G <---This -jar server.jar -nogui PAUSE
if i open the server with the .jar i only have 1g in the server
this is a start.bat
i know
because the jar just opens it with java -jar <file>
so you have no access to heap assignment
Its mostly tied to default maximum memory
but if i open the server with the start.bat my friends can't play
wich i think java has 1g default
i don't know why
what error it says
wich i think java has 1g default
@vernal spruce yeha
what error it says
@vernal spruce no error
There is no difference in using the bat rather than the java
i check the ports and i say close
and if i open with the .jar ports says open
and my friends can play
Okay
god knows why he's using Bukkit
there shouldnt be a difference on it though hmm
java -Xmx2G -jar server.jar -nogui PAUSE
renamed the spigot-1.16.1.jar file to server.jar
ok
cse lazyness to reedit the bat every time..
the same
OMG i dont like this im trying to make it possible for someone to define a custom loottable for the piglin bartering system and it way more complicated than i anticipated
i mean once you get the base down to read from config,you should be good
thats how i often think to a system that can receive as many loottables as possible
hard at beggining,but they get easyer towards the end
@vernal spruce you dont understand im actually making the API in the spigot code
it doesnt exist yet im making it RN
well just be carefull how you structure ur config files
...... its not a plugin its spigot
oh you actually want to make a spigot default api
Im leaning towards wasting time but if u like it go for it
i have made thing for spigot before
did they get in or just suggestions?
I am kind of stuck. I am working on a manhunt plugin (for those who don't know, manhunt is a game mode where x number of players try to complete Minecraft while y number of players are trying to prevent this from happening). The game mode basically needs three unedited worlds to start the game with. My approach was to give the player who creates the game two options, either use the current world and the nether and the end of that world, or create new overworld, nether and end. The first option works fine, the plugin just starts the game in the current world. The latter one not so much, at least for me the plugin crashed my localhost test server while creating worlds with WorldCreator. I am very very new to making plugins, so does anyone have any kind of improvements to the main concept as to how this plugin would function, considering the requirements of the game mode?
I am not sure if the discord server is the correct place to ask for this, or if I should post this on the forums
I mean just do something like a player can "start a game" and as well as choose a worldname. If the world exists it will ask if the player wants to use it. If not create a new world. Also I'd suggest make a wrapper class for each set of worlds.
okay, sounds good, but do you think creating worlds on the fly will be a problem for more powerful servers?
Yes, creating a world can be a heavy process
i think it still depends
after all it will create the starting region rather than alot of chunks
I mean he can do it async on another thread but it
still wanky..
yeah
if you meet any problems along the way just ask here or on forums
if you dont know to work with worlds n such
I think a good idea would be to let the server admin decide if casual players should even be able to create new worlds
in config.yml
well yeah, that is a good idea too
i know this is a bit off topic, but i'm using a spigot server for this so here goes, i have a rasberry pi 4 that i would like to use as a minecraft server, problem is, if i go above 2G of allocated RAM for the server, it says it can't allocate that amount of RAM, and i assume this is because it's a 32bit system, is it possible to increase this limit because i know that i have free RAM space
unsure of how well a raspberry pi would work
It is
Broadcom BCM2711 should have a 64bit architecture in fact
Just the os is 32
yeah but there is a beta for raspbian 64-bit
yh i get a kernel error every time i install drivers for my 7 inch screen tho so it's a no-go for me
I'm quite new to this; I'm some 80 versions out of date, what do I need to run in order to get the latest version of Spigot with fixes?
you use the buildtools
https://www.spigotmc.org/wiki/buildtools/ run --rev 1.16.1(for latest 1.16.1 ver) if not w/e version you need
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
Thank you!
Hi, I'd like to get ItemStacks of both items when you try to stack two different items in inventory. How could I achieve that?
@kindred summit listen to click event
then you have getCursor and getCurrentItem
this will return the item holding in the click,and the item clicked in the inventory
Oh thx
I think this is exactly what I was looking for
it has a similar concept
i'm trying to make when you "apply" a custom item to an enchanted item, it will sort the enchants
actually not a bad ideea
if any one wanna some plugin or anything ( DM )
Do you guys have any idea why holograms are full white instead of colorful? Like I used the codes and they are still being white. I don't have any plugins installed apart from Holograms Plugin
because there is no startup script set?^
if its a command then it should restart
you must have script for it
restart uses the script defined in the spigot.yml if i remember correctly
which is 'start.sh' by default
oh!
and if you type /stop it will restart automaticaly
How i give a permission for a player using luckpermsAPI?
you checked theyr wiki?
how would i make a gliding player boost like the firework boost?
i think adding to theyr velocity should do the trick
id prefer if it there was a rocket and dont really want to simulate particles etc
İs there any code or plugin, start automatic server after closed? İ have egg wars plugin but when match is over, server going to close.(sorry for my bad English)
you might want to work with lobbies?
Whats up guys, I'm trying to add worldguard as a dependency in a maven project, but it keeps giving me the "Could not find artifact" error.. I've tried plenty of things.
Did you add the repository?
I did, yes
?paste
You could show your pom
I mean, the current dependency and repo arent the one I used at first; but I've been trying several things I've seen on forums and all. Pasted my Pom on that link; I'm new to that code sharing link ;p
You put the code there - it'll generate a unique link - you paste the link here
yeah that website is the first one I ever tried, and gave me the same error. Like I said, I've changed it up to try several things I've seen on fora so far; with no succes
This is with the things from that website, with LATEST as version
You should use the one in the link and use 7.0.3 (for 1.15) or 7.0.4-SNAPSHOT (1.16) for the version
Even with 7.0.3 as a version number, the error persists as shown in the image above, sadly
I managed to get rid of the error in the pom-file by rightclickinging "dependencies" and downloading them, and then reloading the maven project, but there still seem to be some errors left..
Looks like you're depending on the latest WG which depends on 1.16 rather than 1.15. Use 7.0.3 as the version instead
Which of the playsound methods plays it for the location rather than just the player?
The one you call from the world
gotchya
I don't think you read what I wrote @wraith thicket
I did read it
You're depending on WG 7.0.4-SNAPSHOT, which depends on 1.16.1, yet your own dependency is for 1.15.2
Alright well I wrote that I already tried the version numbers, inclusing 7.0.3 and all that several times. Anyways right now I only have the errors in the maven project on the side, and not in the actual file anymore so we'll see how it goes when I try to compile somewhere tomorrow. Thanks anyway
You wrote the "I've tried 7.0.3" message 8 minutes before. I assumed you changed something in the middle of that.
Even with 7.0.3 as a version number, the error persists as shown in the image above, sadly
@karmic sable No, I've taken a nap.
In any case, if you're using 1.15, you'd need to depend on 7.0.3 and not 7.0.4-SNAPSHOT
Anyway new update; I tried 7.0.3 now and reloaded the whole maven project, that seemed to take away all the errors everywhere
so I'm guessing the key solution is to reload the maven project completely after adding a new dependency
The key was probably the fact that you had to actually run maven for it to download the dependency
I never tust my IDE - I just run the commandline and see what it thinks 🙂
fireworks have a BoostedEntity getter, but no setter, where would i do that?
Thanks for your time btw drives a ford
@forest plaza what are you trying to achieve?
Oh we got our reactions back? Did someone bother md enough about it last night? lol
@still wing i want to boost the player on SprintToggle while hes in the elytra

Anyone know a good alternative to Ultimate Moderation by Songoda? I'm currently removing all the plugins by songoda from my server cause well f em
public void getPlayerCount() {
ByteArrayDataOutput output = ByteStreams.newDataOutput();
output.writeUTF("PlayerCount");
output.writeUTF("ALL");
Player player = Iterables.getFirst(Bukkit.getOnlinePlayers(), null);
player.sendPluginMessage(this, "BungeeCord", output.toByteArray());
Noobish question, but. Is it possible to use this snippet of code to get the total amount of players in a network, if this specific server has no players? (aka. player == null)
sendPluginMessage() just throws a NPE if there aren't any players on the server
public boolean tableExists(String table) {
CompletableFuture<Boolean> future = new CompletableFuture<>();
new BukkitRunnable() {
@Override
public void run() {
try {
ResultSet result = metaData.getTables(null, null, table, null);
future.complete(result.next());
} catch (SQLException e) {
e.printStackTrace();
}
}
}.runTaskAsynchronously(plugin);
return translateFuture(future);
}
public <T> T translateFuture(CompletableFuture<T> future){
ObjectWrapper<T> t = new ObjectWrapper<>();
future.whenComplete((b, err) ->{
try {
t.set(future.get());
} catch (InterruptedException | ExecutionException e) {
e.printStackTrace();
}
});
return t.get();
}
the t.get(); returns null
anyone knows why
You don't seem to understand how the completable future works
o
The entire idea of the object is that you let it be completed in another thread and then look at the completion when it's done being completed
The lambda in #whenComplete gets run only when the future is completed
That's way after all these functions have returned their values
You return the CompletableFuture
And where ever you expect a response, you use the #whenComplete method
@wraith thicket so there I wont have a problem with that too?
I'll give an exmaple hold on
I spoonfed you an example a few hours ago
i think im doing a small brain move, can anyone help me with this
public static setAFK(Player player) {
AFKList.add(player.getName());
Bukkit.broadcastMessage(ChatColor.LIGHT_PURPLE + player.getName() + " is now AFK.");
}```
netbeans says "invalid method declaration; return type required"
void
maybe try kotlin?
@wraith thicket Do i have just have to do something like this for each function I want to run async
is there not an easiest way to have the function return a String?
That's the gist of it. However, unless you're fine with the #whenComplete method being run on an async thread, you'd need to return to the main thread before completing the future
There's no way to simply return a value from "the future"
So returning a CompletableFuture is the best you're going to get
With that said, you don't need to use BukktiRunnables, you can simply use lambdas. But it won't change your situation much.
Although taking a closer look, I'm not entirely sure when the nested future will be completed. It's possible that's already in sync
Ah true, I still had that function as async from beforer
CompletableFuture<String> future = new CompletableFuture<>();
CompletableFuture<ResultSet> resultFuture = getData("Name FROM PlayerData WHERE UUID='" + uuid.toString() + "'");
resultFuture.whenComplete((b, err) -> {
try {
ResultSet result = resultFuture.get();
if (result.next())
future.complete(result.getString("Name"));
} catch (SQLException | InterruptedException | ExecutionException e) {
e.printStackTrace();
}
});
return future;
}```
so this is the best I could get
--
so if I want to create a new Profile per say and my profile consturctor needs UUID and their Name that are both stored in an SQL DB
I'll get CompletableFutures from both and have the whenCompletes run inside eachother?
or there could I already do something like the code below since it runs on the main thread?
Code:
String name = "";
CompletableFuture<ResultSet> resultFuture = getData("Name FROM PlayerData WHERE UUID='" + uuid.toString() + "'");
resultFuture.whenComplete((b, err) -> {
try {
ResultSet result = resultFuture.get();
if (result.next())
name = result.getString("Name");
} catch (SQLException | InterruptedException | ExecutionException e) {
e.printStackTrace();
}
});
@wraith thicket
guys, the javadocs are not working?
You can run database queries on the main thread. But that just means that your server will wait for a response will be guaranteed to lead to many performance issues
@wraith thicket
Yeah I know but i wasn't talking about database queries
You said it all ran on the main thread, though
so if I want to create a new Profile object per say and my profile consturctor needs UUID and their Name that are both stored in an SQL DB
I'll get CompletableFutures from both and have the whenCompletes run inside eachother?
or there could I already do something like the code i put above since it runs on the main thread?
I think I didn't really make clear what I'm asking re-reading what I said, Basically I'm asking if I can do this and it'll work:
String name = "";
CompletableFuture<ResultSet> resultFuture = getData("Name FROM PlayerData WHERE UUID='" + uuid.toString() + "'");
resultFuture.whenComplete((b, err) -> {
try {
ResultSet result = resultFuture.get();
if (result.next())
name = result.getString("Name");
} catch (SQLException | InterruptedException | ExecutionException e) {
e.printStackTrace();
}
});
Will String name be null here if I return it after this code
getData() is an async function that gets a ResultSet CompletableFuture
When you return it, it'll be "" just like you set it to be
Again - you cannot get stuff from the future now
so this
name = result.getString("Name");
wont work
I'll have to run all my code inside the whenComplete?
Think of it this way:
You put $1000 in an investment for 3 months.
They tell you they expect you to gain on average 3% intereset per month.
And then right after you invest, you ask "How much money do I have after the investemnt"?
You can't tell unless you sit there and wait the 3 months.
So the code will keep running and not wait for the whenComplete to do its shit?
the #whenComplete will be run at another time - that is, when the future is completed
That is - again- way after your method has returned its value
is there a way for me to make my method wait for the value to be returned
Of course, but that's just freezing the server.
or do i just have to do all my code inside whenCompletes
oh yeah I dont want to do that lol
The way this works:
You have a method.
That method creates a CompletableFuture instance
It schedules an async task that runs at a later data
It returns the CompletableFuture object
Now, once the server's done with the tick, the scheduler runs the task on another thread.
And that triggers the completion of the future object
Which, in turn, runs whatever's passed to the #whenComplete method
Alright
so if I had something like
public Profile(String name, UUID UUID)```
and i wanted to create a new profile and I have a function to get a name and uuid completablefuture from the DB i'll need to have two `whenCompletes` inside eachother that create a new Profile object once both are completed using the objects that they store?
You'd most likely want to fetch both in one CompletableFuture - wrap them in a simple object if you must
Gotcha
Hello, i got a small question: Can someone tell me what this Error means/ how i can avoid it (if possible)? My Server works perfect, its just that this is sometimes in my log...
Hmm you have any plugin wich can screw around with pathfinders?
one second, ill give you the /plugins content...
if (Counter.Count.get(uuid) == this.plugin.getConfig().getInt("stepcommands.steps")) {
plugin.getConfig().getStringList("stepcommands.commands").forEach(System.out::println);
}```
How would I make it actually execute the path in the console instead of say what the path is in the console
Those are all my Plugins...
@vernal spruce Is one of them maybe "screwing around" with pathfinders?
[22:53:12] [Server thread/ERROR]: Cause of unexpected exception was
java.lang.ClassCastException: net.minecraft.server.v1_16_R1.EntityEnderPearl cannot be cast to net.minecraft.server.v1_16_R1.EntityPlayer
at net.minecraft.server.v1_16_R1.TileEntityEndGateway.a(TileEntityEndGateway.java:160) ~[spigot.jar:git-Spigot-758abbe-2b00831]
at net.minecraft.server.v1_16_R1.TileEntityEndGateway.tick(TileEntityEndGateway.java:67) ~[spigot.jar:git-Spigot-758abbe-2b00831]
at net.minecraft.server.v1_16_R1.World.tickBlockEntities(World.java:676) ~[spigot.jar:git-Spigot-758abbe-2b00831]
at net.minecraft.server.v1_16_R1.WorldServer.doTick(WorldServer.java:418) ~[spigot.jar:git-Spigot-758abbe-2b00831]
at net.minecraft.server.v1_16_R1.MinecraftServer.b(MinecraftServer.java:1104) ~[spigot.jar:git-Spigot-758abbe-2b00831]
at net.minecraft.server.v1_16_R1.DedicatedServer.b(DedicatedServer.java:354) ~[spigot.jar:git-Spigot-758abbe-2b00831]
at net.minecraft.server.v1_16_R1.MinecraftServer.a(MinecraftServer.java:1007) ~[spigot.jar:git-Spigot-758abbe-2b00831]
at net.minecraft.server.v1_16_R1.MinecraftServer.v(MinecraftServer.java:846) ~[spigot.jar:git-Spigot-758abbe-2b00831]
at net.minecraft.server.v1_16_R1.MinecraftServer.lambda$0(MinecraftServer.java:164) ~[spigot.jar:git-Spigot-758abbe-2b00831]
My server is crashing bcz of this, could it be the spigot ?
Run /version in game, then come back
(RE: BlaD3)
@frigid ember Bukkit has a method to execute a command from the console (as I presume that's what you're trying to do)
Where the sender is Bukkit#getConsoleSender()
yep someone already helped me thanks;)
o/
o7
will do
89 versions behind?
help xd
Thanks CafeBabe. Super handy
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
the bot dead
That wiki explains exactly how to use it
@echo off
IF NOT EXIST BuildTools (
mkdir BuildTools
)
cd BuildTools
curl -z BuildTools.jar -o BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
set /p Input=Enter the version: || set Input=latest
java -jar BuildTools.jar --rev %Input%
pause
i use this code
in a notepad?
ok imma read i t
Would anyone know why when I place leaves they won't decay automatically though when a tree grows and I break the logs down it'lll decay?
That's vanilla behaviour
I don't have anything in my code messing with that
Oh ok
is there a way I can cancel that?
I mean, you can assign the persistence block state for the leaves when you place them if you'd like
Would I have to check if the block placed is an instance of a leave then convert it to Bukkits leaves?
I should also say I'm in 1.8
Yeah that's a different story
Yeah I saw BlockData there in the Javadoc
That was all handled with different byte data and I don't know what they all were. Was a shitty system
Oh ok
I'm not getting anything in my IDE, here's what I have using
if(event.getBlock() instanceof Leaves) {
Leaves leaves = (Leaves) event.getBlock();
}
Block will not be an instance of Leaves. Its MaterialData will
Quite simple though that should be casting it to an instance and be working...
Oh ok
Listen for a BlockPlaceEvent. If it's leaves, get its MaterialData (block.getState().getData())
Re-set it using BlockState#setData(MaterialData) again
is it possible to make block changes on an async thread with threadlocks?
Ok thanks
No. Bukkit & async aren't friendly with one another
not even with a threadlock? lol
Minecraft wasn't meant to be written to asynchronously
Damn, im writing some code for custom mining (uses packets to show block break damage, and custom enchants that can change the speed)
Was hoping I could set the block type in async
obviously I can with packets but thats not ideal
Right, that's about most of what you can do asynchronously and even then, the packets are only queued and still sent on the server thread
I coded a Timer Plugin, but everytime i get this error message: Error:(57, 50) java: no suitable method found for a(java.lang.String,byte) method net.minecraft.server.v1_15_R1.IChatBaseComponent.ChatSerializer.a(net.minecraft.server.v1_15_R1.ChatModifier,com.google.gson.JsonObject,com.google.gson.JsonSerializationContext) is not applicable (actual and formal argument lists differ in length) method net.minecraft.server.v1_15_R1.IChatBaseComponent.ChatSerializer.a(net.minecraft.server.v1_15_R1.IChatBaseComponent) is not applicable (actual and formal argument lists differ in length) method net.minecraft.server.v1_15_R1.IChatBaseComponent.ChatSerializer.a(java.lang.String) is not applicable (actual and formal argument lists differ in length) method net.minecraft.server.v1_15_R1.IChatBaseComponent.ChatSerializer.a(com.google.gson.JsonElement) is not applicable (actual and formal argument lists differ in length) method net.minecraft.server.v1_15_R1.IChatBaseComponent.ChatSerializer.a(com.mojang.brigadier.StringReader) is not applicable (actual and formal argument lists differ in length) method net.minecraft.server.v1_15_R1.IChatBaseComponent.ChatSerializer.a(com.google.gson.stream.JsonReader) is not applicable (actual and formal argument lists differ in length)
i don't understand it
I can at least point in the direction of MaterialData so they're not using byte data in source
Ok fine
is there an event for a piglin being distracted by gold on the ground?
EntityPickupItemEvent should be called when they actually pick it up, but no, an event is not called for when they first realize there is gold on the ground
aw rats
You're welcome to create one and pull request, or create a ticket on the JIRA
lol i have no idea how to make an event
@frigid ember Im currently writing events and methods for piglin and bartering what exactly would you like
oh i was just trying to make them not target gold on the ground
so like i would cancel the event
So you want it to be cancellable
I can do that (if I can find where they get distracted in the code)
thats pretty cool
im pretty new to this type of thing so i have no idea how to make an event lol
Trust me this might take a bit as I'm gonna be putting it in the same pr as my other changes also the piglinai file is quite large and complex
No issues this is quite advanced level stuff if you don't know how to use NMS I would not even try and touch raw spigot
Trust me think nms but it's all NMS your just working off obfuscated named methods
Nightmarish
i can imagine
@frigid ember if you want updates on this make a jira suggestion and I'll subscribe to it and keep it updated
I coded a Timer Plugin, but everytime i get this error message: Error:(57, 50) java: no suitable method found for a(java.lang.String,byte) method net.minecraft.server.v1_15_R1.IChatBaseComponent.ChatSerializer.a(net.minecraft.server.v1_15_R1.ChatModifier,com.google.gson.JsonObject,com.google.gson.JsonSerializationContext) is not applicable (actual and formal argument lists differ in length) method net.minecraft.server.v1_15_R1.IChatBaseComponent.ChatSerializer.a(net.minecraft.server.v1_15_R1.IChatBaseComponent) is not applicable (actual and formal argument lists differ in length) method net.minecraft.server.v1_15_R1.IChatBaseComponent.ChatSerializer.a(java.lang.String) is not applicable (actual and formal argument lists differ in length) method net.minecraft.server.v1_15_R1.IChatBaseComponent.ChatSerializer.a(com.google.gson.JsonElement) is not applicable (actual and formal argument lists differ in length) method net.minecraft.server.v1_15_R1.IChatBaseComponent.ChatSerializer.a(com.mojang.brigadier.StringReader) is not applicable (actual and formal argument lists differ in length) method net.minecraft.server.v1_15_R1.IChatBaseComponent.ChatSerializer.a(com.google.gson.stream.JsonReader) is not applicable (actual and formal argument lists differ in length)
i don't understand it
Any idea what this error means?
[Netty Server IO #2/ERROR]: java.lang.IllegalArgumentException: Component loop
Because correct me if I'm wrong but from judging from the error your trying to put a square in a round hole
@inland oxide longer stack trace?
Then I can't help not enough info
There is no stack
[16:58:50] [Server thread/INFO]: RaptorBoy_TNT issued server command: /ah sell 5000
[16:58:50] [Netty Server IO #2/ERROR]: java.lang.IllegalArgumentException: Component loop
[16:58:54] [Server thread/INFO]: RaptorBoy_TNT issued server command: /ah
dont think it's related to the plugin
It's a hardware error
interesting
Does this happen often
It means the driver caused a loop which was terminated automatically
is there any code or plugin , start server after crash ?
@cerulean musk excuse me what
sorry for my bad english
If you mean automatically start after crash in spigot.yml there are options for that
spigot should be able to in spigot.yml
oh


