#help-development
1 messages · Page 332 of 1
The issue is your timer being redefined every run, you’ll need to keep a reference to the one that’s created on the first run
What is your “Execution.Period” set to?
2 for testing
That’s every 100 miliseconds
?paste
Hello! I have a problem with my plugin, I don't know why because I have actually the same code as my other plugin and It's not working.
Here's the error
https://paste.md-5.net/oyixeduduf.pl
Here's the code:
public class DeathBan implements Listener {
private HardcoreDeaths plugin;
public DeathBan(HardcoreDeaths plugin) {
this.plugin = plugin;
}
@EventHandler
public void onPlayerDeath(PlayerDeathEvent event){
Player player = event.getEntity();
FileConfiguration config = plugin.getConfig();
String pathtp = "Config.Ban-On-Die";
if (config.getString(pathtp).equals("true")){
Bukkit.getBanList(BanList.Type.NAME).addBan(player.getName(), "§c¡HAS MUERTO!", (Date)null, "console");
player.kickPlayer("§c¡HAS MUERTO!");
}
}
}
So what are you meaning?
your path is Config.Ban-On-Die
so it has to be
Config:
Ban-On-Die: true
So what do you recommend me?
Im confused with many so many tasks
oh ok, good idea
But how would add them?
pollFirst returns and removes, peekFirst only returns
But it will only be 1 task
That why im really consued
No, only one will be
I mean it will be only 1 event
verano have you smoked wheel or drank any alcohol today
Hello! How do I clone Spigot and compile it? I would like to make changes to the source code. :) Thanks!
?contribute too
You can find information about contributing to Spigot at the following links:
https://www.spigotmc.org/wiki/cla/
https://www.spigotmc.org/wiki/guide-contributing-to-spigot/
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/README.md
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/CONTRIBUTING.md
last 2 are useful
Does Spigot use some kind of Patch system?
Or is it just editing the Source code?
Nice. To edit it's "git rebase -i upstream/upstream" right?
Or is it base or something similar
Does it use Gradle or Maven?
clone the repo then you can just edit it on your computer
maven
🙏 Thank god
Thanks guys!
Btw, if I happen to port all PaperMC or Purpur patches into the Spigot source, is this probably going to go well?
well all paper patches are in purpur iirc, and all (most?) spigot patches are in paper
so u can just... use purpur
It uses gradle
Yes?
gradlew build be like
I am having trouble getting it up and running on my PC
There is a quickstart guide
if you use intellij, gradle is shipped with it
and you can build with gradle in ij
I use VSCode, seems Gradle is broken with it. ./gradlew build overheats my computer and takes a lot of time to compile.
So for now I will port all purpur patches into the original Spigot source
r u compiling on an original intel 8086 pc?
The worst thing is that it is a high end computer
I tried with a Ryzen 1700 in the past and rn I am using a 11400H from intel
Think you are doing something very wrong then lol
Yeah I might
How can I block a player from running any commands except the ones I allow him to
permissions?
Mmmmm
command pre process event
Listen to the command pre process event and check if the command equals the ones you allowed him
Is that the best solution? I'm adding a spectator mode to my game and I want to prevent people from leaving or changing gamemodes or tping other players, etc
Alright preprocess it is
Thanks both
For that listen to specific events
So its safer
the patching process for spigot/paper is very intensive, your cpu will max out no matter what
wym
GamemodeChangeEvent and others
Contextual permissions from luckperms
hmmmm Also not a bad idea
But I legit need to block everything
It takes 30 minutes
I dont think this is normal
I think preproc is better no?
what cpu?
11400H
Both are good
I would do both
Yeah just in case
Just do one.
has anyone here used structureblocklibapi?
i get this error
[16:37:10 ERROR]: Could not pass event ProjectileHitEvent to Plugin v1.0.0
java.lang.ExceptionInInitializerError: null
with this code
StructureBlockLibApi.INSTANCE
.loadStructure(Plugin.getPlugin())
.at(location)
.loadFromWorld("world", "me", "mushroom_5")
.onException(e -> Plugin.getPlugin().getLogger().log(Level.SEVERE, "Failed to load structure.", e))
.onResult(e -> Plugin.getPlugin().getLogger().log(Level.INFO, ChatColor.GREEN + "Loaded structure 'mushroom_5'."));
What if he didnt specify a combination or Essentials added a new "gamemode change" command
And they get through it
You know this kind of aliases "gm" "gmc"
He is blocking all commands.
Oh right
Isnt there a bigger stacktrace?
So if == the one he likes else if == the ond he likes else block
yeah, just didnt think itd be helpful
[16:37:10 ERROR]: Could not pass event ProjectileHitEvent to Plugin v1.0.0
java.lang.ExceptionInInitializerError: null
at me.fury.plugin.MushroomBowEvents.onProjectileHit(Plugin.java:69) ~[Plugin-1.19.3-R0.1-SNAPSHOT.jar:?]
at com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:40) ~[purpur-api-1.19.3-R0.1-SNAPSHOT.jar:?]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[purpur-api-1.19.3-R0.1-SNAPSHOT.jar:git-Purpur-1897]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[purpur-api-1.19.3-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:680) ~[purpur-api-1.19.3-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_19_R2.event.CraftEventFactory.callProjectileHitEvent(CraftEventFactory.java:1452) ~[purpur-1.19.3.jar:git-Purpur-1897]
at net.minecraft.world.entity.projectile.Projectile.preOnHit(Projectile.java:200) ~[?:?]
at net.minecraft.world.entity.projectile.AbstractArrow.preOnHit(AbstractArrow.java:297) ~[?:?]
at net.minecraft.world.entity.projectile.AbstractArrow.tick(AbstractArrow.java:233) ~[?:?]
at net.minecraft.world.entity.projectile.Arrow.tick(Arrow.java:112) ~[?:?]
at net.minecraft.server.level.ServerLevel.tickNonPassenger(ServerLevel.java:1294) ~[?:?]
at net.minecraft.server.level.ServerLevel.lambda$tick$6(ServerLevel.java:755) ~[?:?]
at net.minecraft.world.level.entity.EntityTickList.forEach(EntityTickList.java:42) ~[purpur-1.19.3.jar:git-Purpur-1897]
at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:732) ~[?:?]
at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1564) ~[purpur-1.19.3.jar:git-Purpur-1897]
at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:482) ~[purpur-1.19.3.jar:git-Purpur-1897]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1424) ~[purpur-1.19.3.jar:git-Purpur-1897]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1194) ~[purpur-1.19.3.jar:git-Purpur-1897]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:321) ~[purpur-1.19.3.jar:git-Purpur-1897]
at java.lang.Thread.run(Thread.java:1589) ~[?:?]
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: com.github.shynixn.structureblocklib.bukkit.Main
at com.github.shynixn.structureblocklib.api.bukkit.StructureBlockLib.<init>(StructureBlockLib.java:33) ~[Plugin-1.19.3-R0.1-SNAPSHOT.jar:?]
at com.github.shynixn.structureblocklib.api.bukkit.StructureBlockLibApi.<clinit>(StructureBlockLibApi.java:16) ~[Plugin-1.19.3-R0.1-SNAPSHOT.jar:?]
... 20 more
Caused by: java.lang.ClassNotFoundException: com.github.shynixn.structureblocklib.bukkit.Main
at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:179) ~[purpur-api-1.19.3-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:126) ~[purpur-api-1.19.3-R0.1-SNAPSHOT.jar:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[?:?]
at java.lang.Class.forName0(Native Method) ~[?:?]
at java.lang.Class.forName(Class.java:390) ~[?:?]
at java.lang.Class.forName(Class.java:381) ~[?:?]
at com.github.shynixn.structureblocklib.api.bukkit.StructureBlockLib.<init>(StructureBlockLib.java:26) ~[Plugin-1.19.3-R0.1-SNAPSHOT.jar:?]
at com.github.shynixn.structureblocklib.api.bukkit.StructureBlockLibApi.<clinit>(StructureBlockLibApi.java:16) ~[Plugin-1.19.3-R0.1-SNAPSHOT.jar:?]
... 20 more
wait ill make a pastebin sorry
Class not found
oh
Something is missing
you need to shade structure block lib
yeah i thought i did
which jar do you use
i have this
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.4.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
and
<dependency>
<groupId>com.github.shynixn.structureblocklib</groupId>
<artifactId>structureblocklib-bukkit-api</artifactId>
<version>2.9.0</version>
<scope>compile</scope>
</dependency>
i didnt download any jars... i thought it downloads on its own?
how do you build, and which jar do you use
which jar = which jar in the target folder
Hey so this gonna sound dumb but I'm trying to block commands using PlayerCommandPreprocessEvent only when a specific gamestate is activated
Should I put the event in the gamelogic file and check there? return if true
lmao
?
i use the maven package action in intellij
im using shaded i think? this appears in my ij terminal
Replacing /home/*/Code/plugins/server/plugins/Plugin-1.19.3-R0.1-SNAPSHOT.jar with /home/*/IdeaProjects/Plugin/target/Plugin-1.19.3-R0.1-SNAPSHOT-shaded.jar
that would be ucorrect
incorrect
use the one with no additions to its name
Plugin-version-snapshot.jar
wait this is all done automatically, this is my pom.xml
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<outputDirectory>/home/*/Code/plugins/server/plugins</outputDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.4.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
how should i change it ?
one sec
@tender shard maven boy wake up
that looks correct from what i remember from maven
Jesus man what a confusing logic https://paste.md-5.net/exizuwewov.cs
wait when i remove the config i get this
Replacing /home/*/IdeaProjects/Plugin/target/Plugin-1.19.3-R0.1-SNAPSHOT.jar with /home/*/IdeaProjects/Plugin/target/Plugin-1.19.3-R0.1-SNAPSHOT-shaded.jar
so theyre the same arent they ?
maven is weird
hey so i was trying to do some stuff when lava and water forms cobblestone the forums said BlockFormEvent but that dont seem to be triggering is there another event?
how do i set all of the Players health in a list in a for loop
for (Player player : Bukkit.getOnlinePlayers()) player.setHealth(20)
tnx
how to i drop an item by a location
Hello so i have this plugin that makes water air when you right click it on PlayerInteractEvent, which event priority should i use for better compatibility with other plugins?
depends what plugins your talking about
i want to publish my plugin and i want it to be as compatible as possible, if i change the block to air on monitor priority, would that cause any issues for other plugins listening to interact event?
location.dropItem
Basically it should be executed last so that others have a chance of cancelling it, since you perform the (probably) action of highest effect - a block change.
so if it should be executed last, do i use Highest?
I think that this was inverted, yes. If it's a modification priority, highest should mean executed last, to not be overruled. I'd have to check the event firing logic myself tho, as I'm not entirely sure.
The events are fired from lowest to highest, monitor being the last to monitor the outcome of the event.
I think highest should be fine then, thanks
How to override a vanilla crafting recipe and change it
Is the only way using nms?
Hey there, does anyone know how to bind an HTTP server to a server's IP? Kinda what Dynmap does
Embed jetty or something
RecipeIterator#remove
How can you test if someone's inventory contains an item with a specific NBT value?
nbtvalue on what
I'm currently debugging
public void activateDungeon(Player player) {
new BukkitRunnable() {
@Override
public void run() {
if (!isEnabled()) {
ChatManager.sendMessage(player, "This dungeon is not enabled!");
cancel();
return;
}
switch (state) {
case WAITING:
ChatManager.sendMessage(player, "The dungeon is waiting for players!");
setWorldBorder();
break;
case RESETTING:
ChatManager.sendMessage(player, "The dungeon is resetting!");
currentLevel = 1;
resetVariables();
state = State.WAITING;
break;
}
}
}.runTaskTimer(plugin, 10, 10);
}
``` but for some reason the state of the game is stuck on resetting. resetVariables() is void after defaulting 4 variables
I m currently debugging
Shading custom classes into .jar
Does anyone know if the PlayerBedLeaveEvent is called if a player disconnects or is teleported to another world?
I was just asking if anyone knew.. There is no reason to be rude
Not being rude, just a suggestion
I will test it if nobody knows but I was asking to save time
why do you use * instead of giving the proper name o0
How do I implement potion brewer? I've done everything but I can't figure out the input instantiation for RecipeChoice()
perhaps my linux profile is named * 🤔
new MaterialChoice(...) or new ExactChoice(...)
anyhow do you know why it doesn't work ?
what exactly doesnt work?
here, java.lang.ClassNotFoundException: com.github.shynixn.structureblocklib.bukkit.Main
epic told me it was because it wasn't shaded
yeah show your full pom please
did you set the scope of structure block lib to "compile"?
yeah
and you do use maven to compile instead of Build Artifacts?
damn i cant upload files
yeah
?img
Not verified? Upload screenshots here: https://prnt.sc/
!verify
Usage: !verify <forums username>
?paste
that looks good. open your .jar with winrar or similar and check if it includes the structure block lib
Telling me these two objects are inconvertible RecipeChoice input = new RecipeChoice.ExactChoice; input.equals(Material.GLASS_BOTTLE);
same with itemstack
that is not a book gui
my brains slow
thats just chat messages
ye but I got the command ready
I just want it to send a warning wait for a time period
and then delete the player profile
save the unix time it should be deleted
check how long until that time
convert that to hours
any tuts?
public void onSprint(PlayerToggleSprintEvent event) {
if (event.isSprinting()) event.setCancelled(true);
}
Despite cancelling it, the player still sprints like nothing happened
Player movement is client side so that's not always going to work and if it does there might be a delay where the player can sprint
Can i somehow clone the entity ?
try to cancel it one tick later
might work, might not work
can someone help me unregister a default bukkit command? the method i'm trying isn't working
public void unregister(String commandName) {
try {
final Field field = getCommandMap().getClass().getSuperclass().getDeclaredField("knownCommands");
field.setAccessible(true);
final Object value = field.get(getCommandMap());
field.setAccessible(false);
final HashMap<K, Command> hashMap = (HashMap<K, Command>)value;
final Command command = hashMap.remove(commandName);
Methods.log("unregistered " + commandName);
}
catch (Throwable t) {
t.printStackTrace();
}
}```
whats the stacktrace
hm then I have no idea
public void register() {
ReflectCommand cmd = new ReflectCommand(this.command);
if (this.description != null) cmd.setDescription(this.description);
if (this.alias != null) cmd.setAliases(this.alias);
if (this.usage != null) cmd.setUsage(this.usage);
if (this.permMessage != null) cmd.setPermissionMessage(this.permMessage);
getCommandMap().register("EpicCore", cmd);
cmd.setExecutor(this);
}```
maybe there's a different way to register the command
oh my god
i figured it out i think
i forgot to include the command in modules.yml. so my plugin thought the command was disabled and didn't register it. it didn't matter if it was a base minecraft command or not fml
all that wasted time
it happens
haha
I want to know the code that resets the value and makes the stone disappear when the snowball hits the stone twice, but I couldn't find a way.
?paste
You'd probably want the ProjectileHitEvent and check if the snowball hits the block, create an itemstack and itemmeta, then if not null, decrease the blocks hardness by half, then when it hits again, check and if the hardness reaches 0 break the block
@jagged monolith I tried that method too, but I couldn't do it because I was a beginner.
uhh can anyone help me with timed deleting of files?
Use a bukkit scheduler to schedule a task to delete the files.
?scheduling
That's why you keep trying and to fix what was broken, not just scrap it.
ok i will do it thank you
}.runTaskLater(plugin, 20L * 30L);```
what does the 20L * 30L stand here for?
hmm okay so heres the code!
@Override
public void execute(CommandSender sender, String[] args, Skyblock plugin) {
if (args.length != 1) { sendUsage(sender); return; }
OfflinePlayer target = Bukkit.getOfflinePlayer(args[0]);
if (target.isOnline()) ((Player) target).kickPlayer(ChatColor.RED + "Your account has been wiped!");
File playerData = new File(Skyblock.getPlugin().getDataFolder() + File.separator + "players" + File.separator + target.getUniqueId() + ".yml");
boolean success = IslandManager.deleteWorld(target.getUniqueId()) && playerData.delete();
sender.sendMessage(success ? ChatColor.GREEN + "Successfully wiped " + target.getName() : ChatColor.RED + "Failed to wipe " + target.getName());
}
``` right so where do I add the bukkit scheduler?
You shouldn't use the com.skyblock package if you don't own that domain. Don't cast offline player to player, use getPlayer
as for the scheduler it depends on what you want
hmm
oka
import java.io.File;
@Usage(usage = "/sb wipe <player>")
@Permission(permission = "skyblock.admin")
@Description(description = "Wipes a player's account")
public class WipeCommand implements Command {
@Override public void execute (CommandSender sender, String[] args, Skyblock plugin) {
if (args.length != 1) {
sendUsage (sender);
return;
}
OfflinePlayer target = Bukkit.getPlayer (args[0]);
if (target.isOnline ())
((Player) target).sendMessage (ChatColor.WHITE + "[WARNING]" + ChatColor.RED + "Your Skyblock profile has been" + ChatColor.DARK_RED + "WIPED");
new BukkitRunnable () {
@Override public void run () {
File playerData = new File (
Skyblock.getPlugin ().getDataFolder () + File.separator + "players" + File.separator + target.getUniqueId () + ".yml");
boolean success =
IslandManager.deleteWorld (target.getUniqueId ()) && playerData.delete ();
sender.sendMessage (success ? ChatColor.GREEN + "Successfully wiped " +
target.getName () : ChatColor.RED + "Failed to wipe " + target.getName ());
}
}.runTaskLater (plugin, 20L * 86400L);
}
}
did I do this right?
You're still casting an offline player to a player.
If the player is an OfflinePlayer you wouldn't be able to send messages to them.
Yes
the rest is correct?
(Player) target) you won't need the cast here as well
why not?
Player target = Bukkit.getPlayer because that's why
hello I'm olivo, I can do math uuugh
You're already setting the target to Player
what the heck, why do you add spaces between the class and method names lol
that looks so cursed
Also, you're using a runnable, you should be using a scheduler instead
Yes it does
hmm
it looks a bit like kotlin
if (target.isOnline ())
(target).sendMessage (ChatColor.WHITE + "[WARNING]" + ChatColor.RED + "Your Skyblock profile has been" + ChatColor.DARK_RED + "WIPED");```
correct?
A little, but still having the spaces between class names and methods is hideous
I dont have the brain capacity to even spell words right with java
You don't need the isOnline(), you should check if not null instead.
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
no clue what you mean with that tbh
oh
no, Bukkit.getOnlinePlayer("name") returns null if the player is not online. that means you shouldnt call "isOnline()" but rather just check if it's null, as Omega already said
just use Bukkit.getPlayer(name) then check if it's null
if yes, shout something at the player who entered the command, e.g. "You fucking imbecile cannot even spell the target player's name correctly"
Player target = Bukkit.getPlayer(args[0));
if (target == null) {
// send sender message
return;
}
// rest of code.
hmm
still not able to figure out the bukkit scheduler
BukkitScheduler scheduler = Bukkit.getScheduler();
scheduler.runTaskLater (plugin,() -> Skyblock.getPlugin ().getDataFolder () + File.separator + "players" + File.separator + target.getUniqueId() + ".yml"), 20L * 60L * 60L * 24L);
}
}```
Cannot resolve method 'runTaskLater(Skyblock, <lambda expression>)'```
BukkitScheduler scheduler = Bukkit.getScheduler();
scheduler.runTaskLater(plugin, () -> {
// your code
}, 20L * 30L /*<-- the delay */);
You're missing a {
@Override public void execute (CommandSender sender, String[] args, Skyblock plugin) {
if (args.length != 1) {
sendUsage (sender);
return;
}
Player target = Bukkit.getPlayer (args[0]);
if (target == null) {
return;
}
(target).sendMessage (ChatColor.WHITE + "[WARNING]" + ChatColor.RED + "Your Skyblock profile has been" + ChatColor.DARK_RED + "WIPED");
BukkitScheduler scheduler = Bukkit.getScheduler();
scheduler.runTaskLater(plugin, () -> {
File playerData = new File (
Skyblock.getPlugin ().getDataFolder () + File.separator + "players" + File.separator +
target.getUniqueId () + ".yml");
boolean success =
IslandManager.deleteWorld (target.getUniqueId ()) && playerData.delete ();
sender.sendMessage (success ? ChatColor.GREEN + "Successfully wiped " + target.getName () : ChatColor.RED + "Failed to wipe " + target.getName ());
}, 20L * 86400L );
}
}
how about now is it correct?
yea
I know
Lol 1 day
Such a time period is pointless to set if you restart your mc server daily lol
An you say it has been deleted, but you don't delete it for a full 24hrs after you say that
hey
does anyone know an easy library for sqlite in java?
i looked at jdbc but it seems too low level and it could be kind of a pain to write raw sql queries with that
something that maybe also provides an easy crud api for basic operations as well?
HikariCP might be able to
i was looking for ORMs in java
and it looks scary lol
so
this is the one recommended in the spigot tutorial itself
the webpage so low budget, and no syntax highlighting, its a bit scary to even look at.
Idk was just pointing out that if you set a 1 day delay and then restart daily it will basically never run as that delay would get reset lol
Hikaricp is only for connection pools. Sqlite is file based therefore cant have a connection pool for file handles
ok any sort of high level sqlite libraries for java?
i have only really ever used nosql databases
i understand sql but these libraries look really complicated to me
Mysql driver supports jdbc connections to sqlite. But literally the connection for sqlite is loading the file and having a file handle opened on it. Then you just do normal sql queries
also, does jdbc take raw text sql queries only or does it have the option to parse in user input without sql injection?
You can do prepared statements which takes input if you set it up properly
um do you have an example?
i am kind of new to this
ok
nvm.
Any idea why white color does not work on shulker boxes? XD All of the available, only white does not work
might be an mc limit
Anyone ever write code for ^ ^ ^? Example: https://youtu.be/ylNtAu24NPw?t=229
Relative faces is this I thought
oh
well the command stopped working totally after the edit
no logs nothing
?paste the new method
why not use the package 
its only recommended that u do the reverse of a domain u own
not required
do you not use like xyz.winnpixie.plugin
i do io.github.winnpixie :v
but you own winnpixie.xyz
since when do you own github
do you get the initial message
oh god theres 2 epics
yep
com.github.username is a very common package scheme
I like the first one better
hell, Paper used to use that naming scheme
yeaa i know i was just messing about
target is null then
github domain is fine iirc
sadly
hmm how do I check that?
some people also do like me.username.thing or just username.thing
use getOfflinePlayer again, check if they are online then set a Player variable
without necessarily owning a .me domain
yea i do me.epicgodmc.thing
i do me.epic.plugin
oga
😮 nearly the same
ill get the necrosword
?paste
no
then?
OfflinePlayer target = Bukkit.getOfflinePlayer(args[0])
if (target.isOnline) {
//code
target.getPlayer().sendMessage()...
} else {
return;
}
i typed that without an ide
i forgot about that
run you need the rest of your code on that top if statement
it wont
yeah\
so this can happen once the player logs on the network and "x" time given in the scheduler has been reached?
i dont think it will check if they are online after the scheduler has been started
if they are online yes
ah
so once the player gets online and the 12 hours has passed it will send this to the player "[WARNING]" + ChatColor.RED + "Your Skyblock profile has been" + ChatColor.DARK_RED + "WIPED"); and once its done with the timer the success message appears in console? which is this (without the player being online)? ````"Successfully wiped " + target.getName () : ChatColor.RED + "Failed to wipe " + target.getName ());```
you would need to use logger to make it send to console too
whats your assumption?
dis ^
trying to make a randomizer system in config. basically, a command is executed every x ticks. would be something like this:
- eco give %player% %random:10-1000%
so, any number from 10 to 1000
any idea on how to pull this off?
it wont wait for the player to get online without you checking for it
nice
thread local random
get a random number between those 2
sure, but how'd i specifically get those two numbers from config?
hello, do you have any interesting plugins under intellij to code more intelligently with spigot?
room gen!
regex probably
Regex very nice
also a headache
Well in ur case its barely gonna give you a headache
xd
(:
You use it wrongly rn
var matcher = Pattern.compile("%random:(\\d+)-(\\d+)%").matcher("someString");
while (matcher.find()){
String firstNumber = matcher.group(1);
String secondNumber = matcher.group(2);
}
it wont be able to match extremely huge numbers
But doubt thats an issue
(And you could probably cache the pattern btw)
Ye, its a bit counterintuitive at first, but it makes sense after some time
Matcher#group(n) returns the nth match right?
hmm the only regex code ive ever used comes from stackoverflow
good to know 💀
only regex i used is from alex
For unknown reasons, some phenomena drives stackoverflow devs to always shove in random . in groups, and classes into their patterns
Well, there is one good one
Probably more than one
But often havent I seen random .+
Ah thats also not java regex if im not mistaken
Or is it?
Ah nvm it is
Lmao definitly spigot tasks are not what i expected tho, they are causing more issues than i can solve
For some fkg reason my code is joining an ifinite loop ceaused by the task
BukkitScheduler?
Threads + infinite loop makes me think there's some kind of deadlock going on 🤔
skill issue
Also sorta sounds like a pebkac issue 😅
a what
Problem exists between keyboard and chair 
And this the code
Im really confused because my task is being executed continuesly
should*
Calendar is practically legacy
💀
From wha i know about tasks they should be run once and then wait until the next execution. But im getting an inf loop
runtasktimer will run until you cancel it
It's equivalent to using a fuckin' Vector or Hashtable in Java 1.2+
on the interval of what you set
Stack uses a Vector :(
Oh i need to cancel it too?
Stack is also legacy, use Deque
yeah, if you dont it will just run constantly
no cue, i did my own FastStack
okay, that makes more sense know
then realised my algorithm was slow asf and then removed it
Fitting name /s
It can happen that sometimes the token is null, how can I avoid an error on the results.get() properly?
i removed all checks to make it the 3µs faster 💀
check if its null
If statements
I ended up writing an entire wrapper lib for that lib just to make it bearable to work with
the token is similar to a 6-digit sequence
You can use JsonObject::has or check if JsonObject::get returns null Ig
getOrDefault(key, new JsonElement()) maybe
- I don't think you can create arbitrary elements
- I don't think there's a getOrDefault.
Well maybe just JsonElement::isJsonNull
JsonObject is a Map<?, ?> no?
If they mean the json value null
JsonObject body = new JsonObject().parse(response.toString()).getAsJsonObject();
int code = body.has("code") ? body.get("code").asInt() : 0;
had to write too much typeadapters to do simple stuff
two map lookups ew
(Agreed)
Mye we need more map lookups /s
I have to ask
How’s all of your projects you were going to write coming along
Well still happening the same 😡
is there anything better?
null check lol
sylfaen
By null
Do you mean
{
key: null
}?
or do you mean that a particular value does not exist
Because gson treats those 2 cases differently
if it doesn't exist it must come out null
He need to check if the property is null or not
in what the "results" variable shows me, it is possible that "token" does not exist
Ah okay
that's why the condition should be "null" if it doesn't exist
so instead of 0 I put null, and instead of "int" I put "String" ?
- getAsString() ?
I’d just say
Conclure please bro i really need you im too much stressed. Im feeling really stupid because i have an inifinite loop caused by tasks
var x = get("token")
if (x==null){
//does not exist such a key
}
x.getAsString();//else
Have you tried debugging?
oh thanks because im really deperess with this shit
Sounds depressing quite frankly
I havent sleep in night
I sleep 4 hours, but still cannot understand the fkg infinite loop
Doesnt make sense
oh ok, how much more or less?
perfect
However I’m inclined to believe @tardy delta is far more proficient regarding debugging than me so maybe ask them
well i will have to wait more time but i dont care if i fixe it
😀
oh right
@tardy delta i need your help for debugging pleasei having an ifinite loop with runTaskTimer()
I have a plugin that needs to remove items of a certain Material value from an inventory, but it needs to ignore custom items that have a matching material value... Is there a simple way to do this or do I need to make something myself?
loop over the inventory contents, if its your item continue, if not check it for what you want to remove then set the amount
Okay, that's what I was thinking, just wanted to make sure I wasn't missing anything. Thank you :)
where do i change the java version im compiling with?
maven?
my plugin is doing the error has been compiled by a more recent version of the Java Runtime (class file version 62.0), this version of the Java Runtime only recognizes class file versions up to 61.0. server is using java 17
how would i add a command to the default / tabcomplete
register it like normal
maven compiler plugin
i believe i changed something cause it was asking for me to update the java
this?
the command is made by the player
its not just a regular command
that property does nothing
this?
check the java version in ij project settings
Because tha is what i need cuz the event should run every 24h at the specific config time
oh i see
this was automatically setup by intellij tho
and has been working before i changed to 18
our sdk level is probably 18 also
look at ur ij project settings and make sure the java ver and sdk level is also 17
Zacken but why is the code being run all time? If the runTaskTimer() will only run the runnable once and wait until next delay time
Doesnt make sense 🤔
yea
I do not send any message in my command and yet in my chat I have the message of the command I sent, any idea why?
if you run java 17 you need to use java 17 to compile with
anyone?
you return false
so send them the usage of the command
it would error if it wasnt in plugin.yml
i mean it doesnt allow me to get higher than 3.2.4
is this one of the differences between gradle and maven ?
even when refreshing maven
that is a bukkit/spigot thing
add what ?
Hey bro please im exausted with this shit, i really want to fix it. But doesnt make sense the issue
so the false returns me in game the written command?
yeah
i also havent slept in like 13 hours or something
so im no help lol
But help bro
I fix this and i go to continue sleeping i wont be sending msg for like hours
interesting, I didn't have the impression that on gradle it did that to me it's weird
it's still giving error @remote swallow @quaint mantle 🤔
Caused by: java.lang.UnsupportedClassVersionError: net/miau/survivalmc/Main has been compiled by a more recent version of the Java Runtime (class file version 62.0), this version of the Java Runtime only recognizes class file versions up to 61.0
the sdk on here might also need to be 17
also check that you arent using 2 different subversions of java 17
hm
i was using java 1.8 before and sdk 18 and it was workign fine
why to java 1.17 i need older sdk? 🤔
jre isnt distrubuted anymore, only jdk
well, the plugin works fine on my computer server, it's just the host is running on java 17
fcking hell
wait, now im confused
Cant u change it?
?java17
Install Java 17 at https://adoptium.net/?variant=openjdk17&jvmVariant=hotspot
what do i do?
if you need to run java17, download the java 17 jdk
ok i will do that
because the jre isnt distributed seperately, its shipped with the jdk
if his server is running java 17, like he said, he would need to compile with java 17
download the msi
🤔 do i put this inside a already made folder?
ah ok
im lost again
it was installing and then it closed and said nothing 😂
and nothing new here
still same error
pom:
anything else to fix this?
how you building
wdym building?
"install"
try using package instead
for some reason openjdk 17 is "Oracle OpenJDK version 18.0.2"
🤔 wtf is going on
you probably downloaded it wrong
there was no option even to make it wrong
i downloaded the msi and installed it
💀
i see where it is wrong
this shit installed it on a completely different folder, thats why i couldn't find it
usually java downloads to java folder, this downloaded to some "Eclipse Adoptium" new folder
oh wow
we can download java versions through intellij itself
this would have been way easier and right away to the correct folders/paths 💀
from what this error says, the Main class if being compiled on "version 62" and from a list I saw online, version 62 = Java 18. but all of it is being compiled to 17 🤔 i don't understand, is there a different option a certain class is compiled on a different version than the project itself?
quite literally java 18
write java -version in command prompt
it's now the version 17 said before
on the server or somewhere else?
any where
is that possible to put same thing twice in a hashmap?
are u telling me to delete all of my plugin? 💀
No, not with the same key atleast.
ow thanks
I am telling you to delete the jar and already compiled classes.
so .put replaces the value everytime
yeah
There's something called ArrayListMultiMap
As long as it's the same key yes.
i clicked on the clean maven button
is that it?
done
why are you using a calendar?
Cause he's putting like 3 different way to do a cd together and trying to make it work.
what class name sounds better for handling pdc stuff on items, PDCHandler, PersistentDataHandler, PDHandler
ItemDataManager
PersistentDataHandler
its just for pdc
thanks
np, i am just that smart.
cd?
might wanna refactor that code
Told him to rewrite it fully.
takes 20 min
20m is you are experienced 🙃
Nah, that was 5minutes.
Is it possible to use LuckPerms groups and permissions through another plugin?
with their api yes
is there a reason the player heads aren't working?
I'm using setOwningPlayer(Bukkit.getOfflinePlayer(name));
is there a different better way to do this? it was working fine in my test server 🤔
(they should be left arrow(MHF_ArrowLeft) and right arrow(MHF_ArrowRight))
oh wait, my test server was in online mode true, this is in false, is "setOwningPlayer" not working cause of that?
😔 some friends don't own minecraft, it's a private survival server
on maven, can we define a command prefix for all other commands already created and future?
is that the reason why it doesnt work? 🤔
anything you can do on gradle you can do on maven, build system wont effect the api. And for that question i dont think you can
Probably, since turning off online-mode makes it so your server isn't authenticating with Mojang. Which... is how skins are retrieved.
it's just that it works fine with the actual player head 🤔
im changing to setOwner even tho it's deprecated, will see
by default it uses the name of the plugin if the command already exists elsewhere, there is no way to change it without touching the plugin name?
oh damn, setOwner also doesnt work
without touching spigot src or using reflection i dont think so
so i can't use "outside" server player heads at all?
Yo guys, how to prevent the infinite water source? is there's any event?
and there is a way to force other commands to use /name:command?
Offline mode stops the server from contacting Mojang since it's intended to be ran offline.... Therefor it can't fetch skins
or it shouldn't be able to fetch skins 😅
but it fetches the players
somehow probably
SkinRestorer does that I presume
You have a plugin doing that
but you don't know?
or whatever other plugin you abuse to allow pirating a game 🙃
yeah
i dont like doing reflection or touching spigot src
😔 no, we have a guy that lives in Iran and he can't access most of websites and can't afford to purchase game
it's just one guy in like 40 😢
💀
Then skip the skins
everyone else has the game
that is tough
Buy him an account
maybe if you crowdfund with the other 40, you can afford them a copy
easy
🤔 well yes but now we already started like this
wouldn't set to true online mode reset inventories and such?=
cause uuids change
also all of the database is using uuids(my plugin)
cannot wait for a namechange to fuck that 
so i kinda just left it like this since it's a private server anyways
?paste
?1.8
Too old! (Click the link to get the exact time)
damn
fixed it by joining the server with those accounts names.
System.err: exists
oh
Yo guys, how to prevent the infinite water source? is there's any event?
declaration: package: org.bukkit.event.block, class: BlockFromToEvent
LuckPerms is installed in my dependencies, and yet I can't call it in onEnable(), do you know why?
out and err arent synchronized on eo
i tried and it doesn't work
ok nvm its not like guaranteed to be colored but

do u mark it as a dependency in ur plugin.yml
did you reload maven
jesus christ
the doc tells me not to do it but it's fixed
thanks @buoyant viper @remote swallow
this is good enough
How it's possible to display this without decimal numbers?
Location loc = new Location(world, (double) x, (double)y, (double)z);
Iterator var14 = Bukkit.getServer().getOnlinePlayers().iterator();
while (var14.hasNext()) {
Player players = (Player)var14.next();
players.sendMessage("௳ " + ChatColor.RED + player.getName() + " ha muerto en " + ChatColor.WHITE + loc.getX() + ", " + loc.getY() + ", " + loc.getZ());
players.sendMessage();
}
?paste
when
hi
so
i am trying to create a few tables in a sqlite database
but it is not making all the tables
it only creates the Players table and none of the other tables.
can somebody take a look?
are you sure there are no errors
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
its not mysql, its sqlite
its the same principe, they dont use anything dependant on mysql
ig he works with chunk corners
You messed up your try-catch and thus suppress your exceptions. Here's what it throws: https://paste.md-5.net/sosoperilo.pl
Change your e.getMessage() to e.printStackTrace();
any idea why the condition doesn't apply when I have the guest rank?
.equals for strings
and .equalsIgnoreCase ?
sure
Would probably be better, and don't String#toString() a String
just primaryGroup.equalsIgnoreCase("guest") ?
"guest".equals(primaryGroup)
i know that but i still dont know how to fix the error.
which one is better?
if primaryGroup is null, your approach will throw a nullpointer ex.
If you already knew that ahead of time, it would be great if you would have posted the stacktrace for us, :,)
oh interesting thanks for the reflection
okay sorry. I don't really know how to read stacktraces and figure out errors with those, so, i just use Exception.getMessage().
thats the result of a toString
at org.sqlite.core.DB.newSQLException(DB.java:1135)
at org.sqlite.core.DB.newSQLException(DB.java:1146)
at org.sqlite.core.DB.throwex(DB.java:1106)
at org.sqlite.core.NativeDB.prepare_utf8(Native Method)
at org.sqlite.core.NativeDB.prepare(NativeDB.java:122)
at org.sqlite.core.DB.prepare(DB.java:264)
at org.sqlite.jdbc3.JDBC3Statement.lambda$execute$0(JDBC3Statement.java:51)
at org.sqlite.jdbc3.JDBC3Statement.withConnectionTimeout(JDBC3Statement.java:454)
at org.sqlite.jdbc3.JDBC3Statement.execute(JDBC3Statement.java:40)
at org.example.Main$Database.executeStatement(Main.java:54)
at org.example.Main$Database.createTables(Main.java:33)
at org.example.Main$Database.<init>(Main.java:23)
at org.example.Main.main(Main.java:12)```
alright there it is
and the source code is posted above
so
any idea what is going wrong?
You basically use the wrong syntax for MySQL/SQLite. You first need to declare your table fields and then, after all declarations, declare your foreign keys. Something along those lines: https://paste.md-5.net/ipifocufif.java
i am using sqlite not mysql
wait, how would that look?
There's a paste attached.
Not true
sorry
hikaricp 🙏
Some events are async, some are not
async ones are?
World-Events will never run async.
the difference between the two is how they are stored. sqlite and mysql both use sql syntax
That's why I wrote MySQL/SQLite, I wouldn't generalize them like that if they would make any difference for you.
Hi how can i create a placeholder that need a player name like %PLAYER_NAME_getLevel% and would look like "%test_getLevel%"
have you atleast tried smth?
I hope that you understood what I was trying to explain about how you first need to declare all your columns with their datatypes and then, at the end of those declarations, specify foreign key constraints. Other than that, I'm happy to help! :)
i watched the wiki and other place but i didn't found nothing in the matter that's why im asking
Hi how can i Fix this Issue
sent out-of-order chat ?
Not quite sure what you're talking about. Are any errors or at least screenshots of the problem available?
My Proxy and srv is Velocity/Paper
and when type command or chat kick him In Lobby
wait send you Screen
man speaking google translate
😄 Bro im not native english person..
I mean if you run your code on some other thread that the server thread, then yes most events are gonna be invoked asynchronously in respect to where you run your code, but in general this is false regarding spigot
Please just send that screen in the chat here
I'm having errors in this, I'm trying to make that when a player dies it joins in a team but i don't know how to continue:
public class DeathBan implements Listener {
private Scoreboard board;
@EventHandler
public void onPlayerDeath(PlayerDeathEvent event){
Player player = event.getEntity();
org.bukkit.scoreboard.Team muertos = board.getTeam("muertos");
if (muertos == null) {
muertos = board.registerNewTeam("muertos");
}
muertos.addEntry(player.getName());
}
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
cant dont know why
?img
Not verified? Upload screenshots here: https://prnt.sc/
where in the code?
when you declare it
im lost
oh its actually Bukkit.getScoreboardManager().getMainScoreboard()
Oh, that seems to be some velocity/paper related stuff, no idea about that, sorry
Oh ok thx
In which part of the code should i put it? I'm kinda new and I'm lost
behind private Scoreboard board;
private Scoreboard board = Bukkit.getScoreboardManager().getMainScoreboard()
Works perfectly, thanks!
And if I want to put a custom suffix and color what I should do?
Team#setSuffix
It adds me to the team, but it doesn't put the color or the suffix
org.bukkit.scoreboard.Team team = board.getTeam("muertos");
if (team == null) {
team = board.registerNewTeam("muertos");
team.setColor(ChatColor.RED);
team.setSuffix(" ᧰");
}
team.addEntry(player.getName());;
okey, basically the team was created before, that's it, thanks mate
Anyone know anything about structure generation? I'm writing my own world gen plugin that generates mazes. I have the maze part down, and now I want to generate structures in the maze that are always at least ~100 blocks away from each other and that can only generate on flat surfaces. The flat surfaces part is pretty easy, and there are no problems there. I already know how to place structures into the world. But I'm stuck on the 100 block distance part because I don't know how to tell if a structure was already generated within the 100 blocks. Anyone know any clever techniques I can use?
I cant Run bungee with java 17, can anyone help me?
Cannot exec './start.sh': No such file or directory
what's your OS?
Ubuntu 20.04
send ur ls
That kinda reminded me of this video I watched recently: https://youtu.be/Ge3aKEmZcqY
Skip to 41:50. It basically was about generating random grass patterns with a minimal distance, and he talked about how he improved the algorithm even further. Maybe you can take some inspiration on that.
Kickstarter link: https://www.kickstarter.com/projects/annarettberg/meow-the-infinite-book-two
This was a presentation I gave to the University of Twente in early 2021. It's a case study of how simple, straightforward coding can turn several thousand lines of code and 10's of seconds of runtime into a few dozen lines of code and a sub-second ru...
so i havae this code so when cobble generates when lava and water touch it does stuff i saw on forums to use blockformevent but it dont trigger is there another event for that?
@EventHandler
public void onBlockForm(BlockFormEvent event){
logger.warning("0");
System.out.println("real");
}```
you are using the correct event, it should trigger when obsidian / cobblestone are formed due to contact with water.
did you register the event?
heyo, im trying to use minimessages in spigot and ive ended up doing this:
private static final MiniMessage SERIALIZER1 = MiniMessage.builder()
.tags(TagResolver.standard())
.build();
public static BaseComponent[] component(final String string) {
return BungeeComponentSerializer.get().serialize(SERIALIZER1.deserialize(string));
}```
is there a way to use the BaseComponent[] in something like `item.setDisplayName()`?
No
Spigot doesn't have api for that
Paper does though
is there any workaround to allow that in spigot?
i was told to serialize it into legacy, would that still keep the click actions and stuff working?
Click actions don't work on items?
Anyways use the gson serializer with https://hub.spigotmc.org/javadocs/spigot/org/bukkit/UnsafeValues.html#modifyItemStack(org.bukkit.inventory.ItemStack,java.lang.String)
declaration: package: org.bukkit, interface: UnsafeValues
well i was gonna meke a method that i could use in chat and items and stuff
@EventHandler(ignoreCancelled = true)
public void onPlayerInteract(PlayerInteractEvent event) {
if (event.getAction() == Action.PHYSICAL) return;
System.out.println(event.getAction());
}
```Simple event handler, never fires if I right/left click air, even with items, it does fire if I right/left click blocks though, anyone got an idea why?
oh i forgot that thank you so much

why the hell dosent PlayerDeathEvent work?
it just dosent do anything when i die i also tried printing stuff and still nothing
@EventHandler
public void onPlayerDeath(PlayerDeathEvent e){
e.setDeathMessage(ChatColor.BLUE + "You have died");
}
}
diiiid you register the event?
ye
are you sure? :S
there is not much else that could prevent this from working i think.
getServer().getPluginManager().registerEvents(new PlayerDeathListener(), this); Did you do something like this?
💀
lol
😄
Is there a way to get the player's skin without NMS or using the mojang api? 🤔
nah
I’m using swm anyone know why I’m crashing when editing a world?
for (int x = -mX; x <= mX; x++) {
for (int y = -(mY - 1); y <= mY; y++) {
for (int z = -mZ; z <= 3; mZ++) {
Block block = loc.clone().subtract(x, -y, z).getBlock();
block.setType(Material.AIR);
}
}
}
Nice, I don't have to pull my hair out due to NMS or worry about rate limiting lmao
I got a dumb idea and I want to see how feasible it is kek
lol
@EventHandler(priority = EventPriority.HIGHEST) // make sure other plugins/events have time to deny
public void onLogin(AsyncPlayerPreLoginEvent e) {
if (e.getLoginResult() == AsyncPlayerPreLoginEvent.Result.ALLOWED) {
// if the join-cache already contains player's profile we just return
if (this.joinCache.containsKey(e.getUniqueId())) return;
CompletableFuture<UserProfile> future = this.loadProfile(e.getUniqueId());
// blocking
try {
UserProfile userProfile = future.get();
this.joinCache.put(userProfile.getUniqueId(), userProfile);
} catch (ExecutionException | InterruptedException ex) {
e.setLoginResult(AsyncPlayerPreLoginEvent.Result.KICK_OTHER);
e.setKickMessage(ChatColor.RED + "Sorry, We were unable to load your user data. Please contact staff with this error message");
}
}
}
i have this code right here that loads a user's data when the player is logging in. and it blocks the thread untill his data is loaded. does anyone know if this will block anyone else from logging in. or will those simply be handled on a different thread each time?
no
uh ig kinda the same thing but get throws some kind of checked exception
they both block
Yo anyone know about slimeworld plug-in
what about it
I’m crashing and idk why
uh okay, thanks i guess
actually use future::exceptionally to set a kickmessage
Everytime I edit blocks in the slime world using code, the server freezes and crashes
Just need to be able to get :p
send your code and wait for someone that knows slimeworld to help ig
Reducing arrow gravity
well honestly dont know lol
I will show u what my cages getting removed looks like one second
void onLogin() {
if (contains profile) return;
CF<userPfofile> future = ...;
future.thenAccept(profile -> cache.put(uuid, profile))
.exceptionally(e -> event.setKickMessage(...))
.join();
}```
or smth
@EventHandler(priority = EventPriority.HIGHEST) // make sure other plugins/events have time to deny
public void onLogin(AsyncPlayerPreLoginEvent e) {
if (e.getLoginResult() == AsyncPlayerPreLoginEvent.Result.ALLOWED) {
// if the join-cache already contains player's profile we just return
if (this.joinCache.containsKey(e.getUniqueId())) return;
CompletableFuture<UserProfile> future = this.loadProfile(e.getUniqueId());
future.exceptionally(throwable -> {
e.setLoginResult(AsyncPlayerPreLoginEvent.Result.KICK_OTHER);
e.setKickMessage(ChatColor.RED + "Sorry, We were unable to load your user data. Please contact staff with this error message");
return null;
});
// blocking
UserProfile profile = future.join();
this.joinCache.put(profile.getUniqueId(), profile);
}
}
@tardy delta somethng like this ?
oh u can chain that ofc
smth like that ig
well my PlayerData wrapper contains an instance of Player, so to manage that well i just store the player in a login cache
and only create the full wrapper when he has actually logged in
might just want to listen to playerjoin event or any event that has a player instance available, get the player wrapper and place the player in or smth
what jankery does https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/commits/d1a1b02112a1fe89f7ef9c16a49211d78e9ef955 fix? There are other enum constructors that have the annotation commented out. How does that break the class?
cant easily kick from playerjoin tho :/
that was my issue
wdym
well i cant disallow the join from playerjoinevent
and i cant kick either. would have to mess with weird delays
and why would you want to disallow?
when the data cant be loaded
just disallow in pre login
is there a way to make a config.yml with materials?
How can i execute a script in java 17?
yes, just use material.name() to save
save material.name() and retrieve it later on with Material.valueOf
or matchMaterial as fallback
Hey. I have a question above game states in a game.
Yesterday I had a big issue in which a state wasn't getting called and I noticed it was because of the function that was never recalled. I thought timeredtasks repeated themselves until cancelled but it seems like this task was canceling on return of the method above. What's the way around this?
https://discordapp.com/channels/690411863766466590/1068007825755869214
please use the scheduler instead of instantiating a bukkitrunnable
