#help-development
1 messages ยท Page 1392 of 1
each command should have its own command class
but get it working with one first
do you have the command in the plugin.yml?
each plugin handles its own commands and its own tab complete
so im guessing you cant make a plugin the control all of the commands right
getExp returns a float but does that mean that exp could look like 31.121289, or just 31.00?
Yes it could return the former
mkay thanks
How can I send a player to another server via Spigot?
PluginMessageChannels I think
Or no but you need to register an out coming channel then use PluginMessageRecepient I think
i try it
Hey there, would anyone mind verifying the signature for Bukkit#dispatchCommand for me? I've got (Lorg/bukkit/command/CommandSender;Ljava/lang/String;)Z right now, but it's not liking it
You can intercept commands but its not simple and its really a waste of time.
hey does anybody know the good tutorial about how to hook into vault as new economy plugin as essentials does?
Not liking what about it
Check the javadocs
?jd
package index
Yeah I checked that. Thats why I'm confused but I'm unable to call the method with that signature.
The error I'm getting is JavaException, so it's not too helpful there ๐
what error you getting
JavaException :"D
That's not an exception I've ever heard of....
^
>thread '<unnamed>' panicked: JavaException', src/jni/mod.rs:15:123
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
Gotta love JNI ๐
rust
Yup ๐
Well start with a backtrace
So the error seems to not be in the signature, but in my arguments, I'm providing it a org.bukkit.command.ConsoleCommandSender (Aquired from Bukkit#getConsoleSender) and a java.lang.String, so that should be good if Im not mistaken
Backtrace would just tell me where the call is coming from, which I already know ๐
But ill give it a shot ๐
Otherwise check line 15?
This would be line 15:
let command_success = env.call_static_method(bukkit_class, "dispatchCommand", "(Lorg/bukkit/command/CommandSender;Ljava/lang/String;)Z", &[console_sender_object, rec_jstring]).expect("Unable to execute command.");
I already split it out a bit to env.get_static_method_id, that is now succeeding, so the signature should be valid
What is bukkit_class?
This would be Bukkit class, so org.bukkit.Bukkit: env.find_class("org/bukkit/Bukkit")
Aha, I wrapped the call to Bukkit.dispatchCommand in a try/catch, which I wrapped in my own method, with just a printstacktrace on all Exceptions, java.lang.IllegalStateException: Asynchronous command dispatch!
That one explains a lot
is it possible to add a command's permission in plugin.yml so its hidden in /help but not throwing spigot's permission error?
Unfortunate I dont get that kind of exception in the rust stacktrace, just getting JavaException
Not sure how to solve that though ๐ค
Obtain the scheduler to call it later?
Though that might be a bit complicated to do with JNI
yeah, so I think I'm doing a wrapper method
public static void execCommand(String cmd) {
try {
new BukkitRunnable() {
@Override
public void run() {
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), cmd);
}
}.runTask(WebServer.plugin);
} catch(Exception e) {
e.printStackTrace();
}
}
Where the catchall for Exception is on purpose, because a catch on exception all is better than a panic in native code, which will crash the JVM
So that works :"D
Heyaa
I am making a plugin and I want to read lines and then turn them into cmds (DONE)
public HashMap<String, String> getGifts(String playerName) throws IOException {
HashMap<String, String> hashMap = new HashMap<>();
File file = new File(plugin.getDataFolder(), "GiftManager.txt");
BufferedReader br = new BufferedReader(new FileReader(file));
String st;
while ((st = br.readLine()) != null){
if(st.contains(playerName)){
String[] line = st.split(",");
ArrayList<String> list = new ArrayList<>(Arrays.asList(line));
list.remove(0);
for (String s : list) {
String[] j = s.split(";");
hashMap.put(j[0], j[1]);
}
}
}
return hashMap;
}
This is my code, I want to like delete the same line after its read, how can i do so
txt file tho
Off that code... just delete the file once you loop through it.
yep
so he's trying to delete the specific line
@quaint mantle rewrite it to use a YamlConfiguration instead
Read it wrong. Yeah my bad
Vinit,/give Vinit diamond 32;Basta
Basta,/give Vinit diamond 32;Vinit
I want to delete all the files with the name i give in the method
The first one is the name
btw this is the whole file structure
again, YamlConfiguration is a way better solution
ye but i have some other things so yml isnt confortable, but still do u have an example for this structure
no lol
whats wrong with yml?
^
yml is like the pog pog config lang
eh i prefer json
vinit:
cmd: /give
refer: Basta
vinit:
cmd: /give
refer: Basta
vinit:
cmd: /give
refer: Basta
vinit:
cmd: /give
refer: Basta
So how would you delete the tthing
all valid json is valid yaml
I tried JSON but i dont really know how would i do the writing part
hence yaml > json
it isnt tho
I would also need to print data in json
yes
```yaml
{
"a": "b"
}
```
try sending that
it will give you the right colors because its valid
yaml is a superset of json
thats an irrefutable fact
i use intellij
cfg.set(path, null);
that doesnt really look like intelliJ
allllr thanks a lot
xDDD why dot u use Material theme
ew
btw can i know what plugin are you making
im currently working on SpigotAV
whats that?
get what?
vsc theme
its a custom theme
please can i ge a tutorial
weeb spotted
anyways
itssss soo cool man
also requires administrator
got it
and makes you not elegible for support if vscode breaks
ye that aint a prob either
xD
i mean, its on the extension store
@quaint mantle if you want a custom one just ask lol
i see
if you have some way of syncing extensions enabled itll even sync
coz theyre on the extension store
can you send me your code? like copy paste?
xD
the arcane what now
?
@quaint mantle again if you want a custom one just ask
coz i have to maintain my plugin anyways
i even bypassed the hash checks of vscode
otherwise you'd get a "This installation of VSCode is corrupted"
oh no
how to install the theme now
is vscode any good

restart vscode as administrator @quaint mantle
programming
i use it for coding nodejs shit
its a fancy text editor
can be good for anything really
is it fancier than Atom?
neither, couldn't tell ya
if it's more practical for quick edits than atom fuck yeah ill start using it
But what to do with the git folder
thats just the code for it
I honestly cant get away from the jetbrains stack.
JS -> Webstorm
Java -> IntelliJ
C/C++ -> Clion
Python -> PyCharm
C# -> Rider
again i can make you one and upload on extension store
nano 4.8 lol
yes nano 4.8
jetbrains is just a good ide maker
thats the extention thing?
guessing ubuntu? @dusty herald
oh hell ye
well to be fair
how do i remove the aniem girl
JS -> vscode
Java -> IntelliJ
C/C++ -> nano
Python -> vscode
C# -> rider
Python -> nano
edit workbench.html
JS-> Webstorm
Java-> IntellIJ Ultimate
C#-> Rider
Python-> PyCharm Ultimate
only thing i can justify coding with nano is scripts
For me its actually
JS -> trashcan
Java -> IntelliJ
C/C++ -> VSCode
Python -> PyCharm
C# -> Rider
Because Clion is kind of bad...
I just got the github pack
C:\Program Files\Microsoft VS Code Insiders\resources\app\out\vs\code\electron-browser\workbench\workbench.html @quaint mantle
got it
tho youll have to patch the hash checks manually
is trashcan an actual editor or am i missing the joke lmao
...
JS is hell to work with
guess its the latter lol
TS or bust. I dont touch raw JS
though I prefer JS over vbscript

nah got it
imagine still using vbs
Lol isnt that the language thats used for excel scripting or something?
any lang minus C# that microsoft makes is booty
internet explorer alternative for javascript iirc
um yes?? send it ?? to me??
send what?
that is awesome
whatever that is
its mpxplay running on ms-dos
on a pentium 2 w/ sound blaster
lmao
god i want that so bad
lol it plays flacs fine
Im so glad when WebAssembly gets more mainstream. Writing your frontend in Kotlin feels so nice. And i dont have to use a single line of js then.
ah yes r/engrish
Or C++ or Java or Rust
Many languages compile to WebAssembly
is rust any good?
the windows version works with wine tho
I'm thinking of learning it
oh i just run c# under webassembly
the source code is linked on that page
the dos/win32 version is written in OpenWatcom C 1.9
the MMC (windows GUI) version is written in QT5
anyways
how can i get the plugin directory?
Hi! I just wanted to ask how long it takes for a PR to be reviewed, since I am waiting for over 18 days already.
a PR to what?
It has mistakes
you return the same message for command not found and for command cancelled. Yet you have a seperate response string for each
override onLoad
I have a question. So i want to make something like a quest plugin. To make my npcs i use znpcs plugin. Is tahat NPC an entity? Because it doesnt work on it D:
You can't use spigot calls in your onLoad
how would i get plugins dir?
Plugin.getDataFolder().getParent()
in onload i meant
same
throws this
?
you could make your plugin run at startup ๐คท
oh it just doesnt work when plugman reloading it
plugman is a sin
its a godsend when testing
There is no getPlugin() method in JavaPlugin
works fine
The method doesn;t exist
You created your own getPlugin() method
this is your plugin so just use this.
not in a static context
onLoad isn;t a static context
then set an instance
and you were attempting to call scan in a non static in yrou code
@crude charm You got the code by any chance?
First guess would be that you just use toString on a Future.
what u want the code of?
those 2 Strings were actually meant to print "Command not found" as the default message, but if you override them, you can customize this messages. But I'll change the commandCancelledMessage to The command may not be executed. Thank you
And the suffix may no be longer than 32 characters
scoreboard or the bc method
@crude charm From the JoinEvent
public static String rankPlaceholder(Player player) { return PlaceholderAPI.setPlaceholders(player, "%vault_rank%"); }
As for a timescale, it seems to be just when someone notices.
@jovial abyss
@crude charm I am not 100% sure but this bungeeChannelApi.getPlayerCount("ALL") might return a future
And you cant just call toString
1 sec I may have made the dumbest mistake ever
I have a question for pro devs
what is the difference between #toString and String.valueOf
String.valueOf is null safe for example. There are also some more differences
aight
what should I use?
lots of people use toString but intelliJ always says valueOf
Depends on your case. Do you have a value that could potentially be null? Then use valueOf
aight
DONT LOOK
im dumbn
spiofhsdiougshgsjghsikug
dsfhghdfs
hfsdh
dsfhds
I cant read
why TF did I read my selector clas
lmfao

i saw O.O
Does anyone know why playerInteractEntity is fired only once and not every time the client send a interact entity packet?
because the server needs to process the packet and see if the player hitting the enitty is valid
what I mean is, if I intercept the packets one normal click = 4 packets, if I use PlayerInteractEntity 1 normal click = event fired once
whats wrong?
?
what event would handle my cursor being put on an empty slot, then pressing 8 on my hotbar to make it go there
JSONROY:
VINIT: [/give, /crate]
BATOP: [/op. /start]
How would I get all the items from the VINIT ARRAY
time to put malware on my server
lmao it works
Is it like an antivirus for a server?
yes
xDD
anyways it works
XD x2
I swear I like gloss over the error
post it here
read it while waiting
then solve it
JSONROY:
VINIT: [/give, /crate]
BATOP: [/op. /start]
This is my yml, how would loop through all the children of JSONROY??
getKeys(false)
and then get the strings in the array
I want to like store alllll the string, /give, /crate/ op, /start in a array
you are smort as fricks
i mean scan is ez
xD
what do u want to do?
ive been scammed I was told great thing using spigots scoreboard system and this is the issue ive been dealing with forever
JSONROY:
VINIT: [/give, /crate]
BATOP: [/op. /start]
I want to get the contents of both the arrays in one array, how do i do so?
/give, /crate/ op, /start in a array
ArrayUtils.addAll(vinit_array, batop_array);
@crude charm You are still using just toString (or String.valueOf)
- youre using a java object representation as a string
- its longer then 32 characters
anyways
craftbukkit 1.8?
got it thanks @earnest junco
what am I supposed to use?
how to get the number of children in the root obj (Yml)
how do you mean?
@crude charm Do you know what a Future is?
just use a hashmap
Java doesn't have tuples(at least not inbuild like this)
yeah lemme just use a HashMap<bool, string>
yes ofc
public CompletableFuture<Integer> getPlayerCount(String serverName) {
Player player = getFirstPlayer();
CompletableFuture<Integer> future = new CompletableFuture<>();
synchronized (callbackMap) {
callbackMap.compute("PlayerCount-" + serverName, this.computeQueueValue(future));
}
ByteArrayDataOutput output = ByteStreams.newDataOutput();
output.writeUTF("PlayerCount");
output.writeUTF(serverName);
player.sendPluginMessage(this.plugin, "BungeeCord", output.toByteArray());
return fu
this is the method im using to get the player count
lol
just make your own real quick
im just gonna write a custom class
JSONROY:
VINIT: []
BATOP: []
There could be 100 of those children, how to get the total amount and then loop through all of JSONROY's children and get their array
I think CompletableFuture#get should work in your case(But I wouldn't recommend it)

aaa
then what do Ido
uh
@crude charm You can give a Future a Callback-Function, which is executed when the value is obtained
Are you using configurationSection?
java is open source, add it ur self xDD
I am using a FIleConfiguration
just call on the object getKeys(boolean)
how can i return an instance of a class with values without a constructor in java?
ye but then it gives a set
I have a really nice snippet for it, just a sec
in C# you can just do cs return new ScanResult(){ Suspicous = false, Detection = "none" };

private static ReferalX instance;
public static ReferalX getInstance(){
return instance;
}
@Override
public void onEnable(){
instance = this;
}```
?
.
dont I have that?
synchronized (callbackMap) {
callbackMap.compute("PlayerCount-" + serverName, this.computeQueueValue(future));
}
thats not what i was looking for vinit
with values??? uh jsut use a constructor
ew
yeah but im avoiding constructors lol
DI > Singleton
thats gonna null :/
or hell, anonymous classes
System.out.println(permissionMap.getOrDefault(perm.getName(), perm.getDefaultWeight()));``` is a hashmap of <String,Integer> and getDefaultWeight() returns int but im getting cannot cast double to int ๐ค ๐ค ๐ค ๐ค
what is DI?
Dependency Injection
depenceny injection
i cant spell
yes ofc
why cant we have anonymous classes and tuples
JSONROY:
VINIT: []
BATOP: []
I want to get JSONROY's child
But
Set<String> list = plugin.getCustomConfig().getKeys(false);
``` this will return the JSONROY thing right??
still need help
is it not the inventorydragevent with e.getCursor() and e.getOldCursor()/
how would you implement that?
i'm just making sure tho
It just return the childKeys
I cant find it in your code. bungeeChannelApi.getPlayerCount("ALL").toString() needs to be replaced with your callback, or better the whole line onlinePlayers.setSuffix((Hub.secondColour + bungeeChannelApi.getPlayerCount("ALL").toString()));
moving an item across ur inventory with the use of hotbar keys isn't client side tho
i jus dk what the event is
what child keys
vinit and batop
like this?
private final Map<String, Queue<CompletableFuture<?>>> callbackMap;
thats not gonna work
:/
aight
I've never seen this error in my life
PlayerGameModeChangeEvent may only be triggered synchronously.
lol
Whats not going to work?
You're running it off main-thread, so probably async or in a future
nvm
you are calling it async
ehh ill just use a constructor
thats what I have?
running it on a bukkit runnable
the runnable is async
so async it is
JSONROY:
VINIT: []
BATOP: []
VINIT:
JSONROY: []
BALTOP: []
This is my whole config, what will it return when i do
Set<String> list = plugin.getCustomConfig().getKeys(false);
Thats what is inside the pastebin yes.
HashSet containing JSONROY and VINIT
jsonroy and vinit
so ye what am I replacing it with?
and then how will i get the child under JSONROY or VINIT
just change false to true
but then it will also return VINIT
I'm doing it bois, im gonna ask a question on stack overflow
you sent what I already had
i only want one
so?
Hum, wait
I think it is case sensitive
You will get only once
if you use every time upper case letters
@crude charm something like this bungeeChannelApi.getPlayerCount("ALL").whenComplete((integer, throwable) -> /*code to set the suffix*/)
aight thanks
didnt realise u meant like that
im super tired
sorry
Can you show me a example to get all the data in the arrays of JSONROY
xD
@crude charm np
bungeeChannelApi.getPlayerCount("ALL").whenComplete((integer, throwable) -> {
e.getPlayer().getScoreboard().getTeam("onlinePlayers").setSuffix("");
});
how do I set the suffix?
Presumably setSuffix ?
JSONROY:
VINIT: ["HEHE", "XD","LOL"]
BATOP: ["OOPS", "OOF", "LMAO"]
VINIT:
JSONROY: []
BALTOP: []
How would u get all the HEHE XD LOL OOPS OOF LMAO in one java array
like get all the things in the childdren of jsonroy
if you want merge all the arrays, just use config.getKeys(true)
then loop through it and merge
onlinePlayers.setSuffix((Hub.secondColour + integer)); should work?
ye but that will get the arrays in VINIT too
.setSuffix("");
how do I get an instance of #getPlayerCount
do I just re
I only want from a specific object
oh
aught
I triedthat but I did it outside the methgod to test, dont ask questions LMFAO
just use config.getConfigurationSection("OBJ_KEY").getKeys(false)
and then how do u get their array things
loop through the hashset and do configurationSection.getStringList(key)
aight
I have a question. So i want to make something like a quest plugin. To make my npcs i use znpcs plugin. Is tahat NPC an entity? Because it doesnt :d
It should be an entity
Use Citizen API, it has a really good api, + yes its an entity
@jovial abyss
still getting it
show me your code
Much more convenient
it appears your suffix is 32 characters, which is more than Bukkit allows
if it doesn't have an API just intercept the packets
cause of error
it would appear you're trying to convert a CompletableFuture to a string?
e.getPlayer().getScoreboard().getTeam("onlinePlayers").setSuffix((Hub.secondColour + integer));
})));``` replace it with
```bungeeChannelApi.getPlayerCount("ALL").whenComplete((integer, throwable) -> {
onlinePlayers.setSuffix((Hub.secondColour + integer);
}));```
why set a suffix?
cause its teams
In more human language? Which event or something shiul I do
question
yes?
Seems good
why not just.. Bukkit.getOnlinePlayers().length
its not tho
If the plugin that you are using doesn't have a prebaked interface to manage the events (Which I doubt) you can intercept the packets the client send
How can I create abstract methods in an enum with default values? Is it possible?
cause its across servers
You are not going to be able to delay the PlayerJoin while you do a bungee query
huh
Anyone know?
the parameter integer in integer, throwable is not an integer
I'm assuming bungeeChannelApi.getPlayerCount("ALL").whenComplete is doing a plugin messaging query to teh bungee proxy
I don't think it is possibile
yes using plugin messaging channel
What exactly are you trying to accomplish and what do you mean default values? Enums can have default values.
You are going to lag, if not crash the server if you try to wait for that to query in the PlayerJoinEvent
Odds are, they will lag out the player before the server lags out
I think he want to have an enum that extends another enum
or lag out all the players XD
I donty
that fact might change with more players
Events.subscribe(PlayerJoinEvent.class)
.handler(e -> {
Bukkit.getScheduler().scheduleSyncRepeatingTask(hub, new Runnable() {
@Override
public void run() {
e.getPlayer().getScoreboard().getTeam("rank").setSuffix(Hub.rankPlaceholder(e.getPlayer()));
bungeeChannelApi.getPlayerCount("ALL").whenComplete((integer, throwable) -> {
e.getPlayer().getScoreboard().getTeam("onlinePlayers").setSuffix((Hub.secondColour + integer));
});
}
}, 50L, 50L);
});
}
I start a loop
I have seen servers lag out players because of attempting to delay the joining of a player
fun when that happens ๐
not doing that
It would take me a while to explain, but the bottom line is that I'm trying to make an enum with multiple abstract boolean methods that all return false by default, but the one overridden by the enum entry returns true
In yoru scoreboard handler you don;t
delaying the update
Zoi can you make sure that the integer variable is actually an integer?
There needs to be a #help-development-overflow
nah
sure
yeah that isn't going to work. Enum's are not dynamic. Once they are set they can't be changed.
BungeeChannelApi.getPlayerCount("ALL") returns a CompletableFuture<Integer> so I am pretty sure it is an Integer in whenComplete
^
If I would block the packet (Player Position And Look (clientbound)) the downloading terrain screen should not close right?
I know that. I meant that I want to make an enum where you don't have to implement every single method saying return false for the one you aren't using, and instead just overriding one and returning true.
@wet breach
player.sendMessage(mainColour + "Welcome to " + serverName + " there are currently " + integer + " players online!");
I print it here and it returns what @jovial abyss said
it's still a CompletableFuture<Integer> in whenComplete apparently because from what I can see with the error, it returns a function and not an actual integer
as you can see there
its returning an error because something is wrong
that is not an error
whenComplete returns a CompletableFuture yes @dusty herald
the error is caused by the suffix being too long
well its not working correctly
issue
not working as intended
Can you send the code from this? @crude charm
It isn't about the screen disappearing, rather you have limited time to let the player connect otherwise they DC, but depending where this occurs you can affect all other players since some things have to be sync, such as sending all the packets to the other players that another player joined etc.
you delay the joining and you can very well end up just causing everyone to DC because of it lol
bc.getPlayerCount("ALL").whenComplete((integer, throwable) -> {
player.sendMessage(ambientColour + CC.STRIKETHROUGH + "-----------------------------------");
player.sendMessage(mainColour + "Welcome to " + serverName + " there are currently " + integer + " players online!");
player.sendMessage(mainColour + "Discord: " + secondColour + discordLink);
player.sendMessage(mainColour + "Teamspeak: " + secondColour + teamspeakLink);
player.sendMessage(mainColour + "Twitter: " + secondColour + twitterLink);
player.sendMessage(mainColour + "Store: " + secondColour + storeLink);
player.sendMessage(ambientColour + CC.STRIKETHROUGH + "-----------------------------------");
);
@jovial abyss
Help, anyone?
can i see your code arch
Sounds like you need to restructure your enum then. You can make a method that queries the enum automatically and return whatever it is you want. Whether it be false true etc.
wdym
i was asking arch a question
lol
have you got your vaccine frost
what wrong
oh jesus
obviously, right now the @Override has an errror
why is all of this in an enum class
^
print out the class of the parameter integer(even though I am 99% sure it should be an Integer)
I know, I know, it used to be an interface. But I switched the methods over to the enum itself because I would have access to all the enum entry data, and I didn't want to pass all of the enum entry data through the interface. Maybe I should switch the methods back to an interface implemented by an enum?
where is it?
I middle clicked it like I normally do...
just integer.getClass() because I am interested
ye same
This?
Also, there was a lot more in the enum that I didn't post because it wasn't relevant
oh wait
You know what
it literally
doesent print
WTF
I'm switching it back to the interface
player.sendMessage(String.valueOf(integer.getClass()));
printConsole(String.valueOf(integer.getClass()));
Whatever, the only thing I'll be missing is better error messages
neither print
Ok my guess is that you arent updating the plugin or the server
You use an old version of the plugin
no and see was right on the restructuring of the enum class being needed
try using system.out.println
bukkit could be intercepting sending that
๐คท
Does anyone know what packet contains sign data/text?
I can try
but this should defo work
public static void printConsole(String message){ Bukkit.getServer().getConsoleSender().sendMessage(message); }
been looking through that for hours
tile entity data doesn't even get triggered for me
and sign update is deprecated
isnt that part of block data tho?
maybe
nope
afaik it sends a block update
still not printing
System.out.println() works fine for me
guys why Do I receive 4 packets "Interact Entity" with one click (2 two main hand and two off hand)
?
mouse down and mouse up? @cold field
are those false positives or nah
ofc
nah @dusty herald
WTF
im using actual malware to test it lol
oh
sign update might be deprecated but it doesn't mean it is unusable. You are limited what you can do with signs in regards to packets but it depends what you are trying to accomplish as well
all the same worm
I thought it was the real thing
well yeah @dusty herald
lmfao
still not working
maybe change " + integer + " to integer.getClass() and roll with it
i will try it out. Btw my plan was editing text inside the packet to filter out certain words
๐คท maybe Saith was right and you aren't properly updating the plugin file
because there's two states each.
Interact at (with location) entity using the main-hand
Interact at entity using the off-hand
Interact with (without location) entity using the main-hand
Interact with entity using the off-hand
so I am
thanks I just found it out
ahahah

Then you are better off then just checking the sign after that packet is sent @quaint mantle far easier doing it this way
Put a println("TEST") after setJoinMessage just to be sure
sure
may work, but i am not sure if thats a resource efficient solution
and then for checking already placed signs is just a matter of checking when a chunk loads for tile entities and then checking if they are signs
its not very efficient when lots of chunks get loaded
you can check chunks async
true ig.
you don't need it to be sync for this until you need to actually do something with the sign IE, change its words
that event is async?
what did it print Zoi?
TEST
i thought it didn't specify it was async
Which event?
ok so print integer.getClass()
hell yes

chunloadevent

Then try to replace whenComplete, with get (Should return an integer)
the event is sync, but that doesn't mean you can't spin up async methods however and take a copy of the chunk to look over it
hm right. Also just checked update sign packet. Doesn't work
nono thats not what I meant
update sign packet is something you should use to know when someone edited a sign to check it afterwards, you can't modify the contents of that packet
you either can deny the packet or allow it but not change it
that was why I suggested checking the sign after, because once the player is done editing it, they can't edit it again but you are then free to manipulate how you see fit
System.out.println(i);```
does anyone know how to implements command suggestion (not auto-completion) just a string that shows up and tell you what you should type like as <args> or <int>
don't think that is possible but you could make use of the help pages
vanilla commands can ๐ฆ
those are auto-completion if i am not wrong
if vanilla commands can, then it could be something that brigadier provides
and would need to hook into that
just the higher versions show it like that
I keep timing out
when I join
Yes, you can;t delay the join that long while you do your plugin message query
I was suggesting not to delay the join just delay when the player is able to see
you have a maximum of like 15-30 seconds before timeout occurs
it was fine before this
@crude charm get blocks the thread and prevents the player from joining
is it a bad idea?
Just do your query code in the https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/AsyncPlayerPreLoginEvent.html. That you can delay. Then release it when done
ops..
yeah, seems like tab-completion^^
โก๏ธ https://github.com/JorelAli/CommandAPI
Store teh number locally so your PlayerJoinEvent just uses teh local value
I cant
screenshot shows me nothing
of course you can;t
let your method pass a Player argument
the player doesn;t exist yet
I'm aware of that
but that why I cant use it
because I need to get it
to update
the stuff
oh im dumb
uhdfrgiodhguidj
nvm
forgot I said that
In the pre login event call the query to get the total players. Store that to a Field that your PlayerJoinEvent can read from
ik
you could just cache that number instead of querying it every single time and just update it over time. Easy to factor in a player to update the integer to show appropriate numbers lol
this should not be this big of a pain
its totally not
The pre login can be delayed without lagging the server or disconnecting players, and the connecting player will sit at the connecting screen until you are ready
well it is
Because you are trying to do something that is taking too much time
if its been broken for the last 2 hours
and you insist on it working because you don't want to change anything
but it doesent take alot of time
obviously it isn't working....
or shouldn't
Its not difficult, you just have to use the right events
ik
but I feel like
I should be able to
get the method
and be done
thats what its made for
not being annoying
Thats not what its made for
wow it looks like a good lib
sadly I need to stick with mine
and it works
maybe hostflow malware
when the PlayerJoinEvent fires you should have all the data you need to process that event ready and waiting.
the playerjoin event was never meant to be used in ways most people use it. Hence why most of the time you want to do something with a player that joins you need to wait like a tick or two after they have fully joined to do things.
because even when that event fires off, they are sometimes technically still not fully joined
hostflow malware?
yes
pre-login event gives you some information that a player is about to connect and you can get the players name from that event. Thus you can grab an offline player object from it if you need player information. This lets you have that information already on hand for when the player does fully connect
it isnt, i know what they are
because you are using spaces maybe? Yaml doesn't like spaces in certain areas. One of those being the path
in your plugin source have a javasisst package ? or comflex directory ?
because Text is a MemorySection node under Welcome Message
its a string tho/
Yeah spaces are bad
change space to _
change to _ or wrap it
ugh
when it comes to path's, yaml dislikes spaces @solemn shoal in your pic, change Welcome Message to Welcome_Message
its weird how ive never had issues with that
the path is not an issue lol
is that to me?
anyways most likely its coz my string wasnt in quotes
I use spaces in yaml paths all the time
what spigot u forking?
who me?
yes
im running yatopia
isn't yatopia built with 1.8 in mind?
no clue
you can run ViaBackwards etc tho
anyone can teach me some basics to make plugin?
or protocolsupport
is it good? like good good?
quick question, efficient way to check if player is bellow set y level without an onMove event
I wanna make an rpg system, might have to fork it
yatopia is a fork of paper, which is a fork of spigot yeah
lmao
Use case? as Spigot is event driven.
is this new species good? like good good? I wanna make an rpg system and gonna make a custom spigot for stuff
bruh just when u fall down bellow given y level
then move event is your best bet
i mean
yatopia is pretty good yeah
this is on my plugin dev server
running some random dev build of yatopia
can forking a spigot change what spigot allows? I want to make very detailed mobs without a texture pack, would I custom spigot allow for this?
*detailed custom mobs
no
like wynncraft
If you want more features contribute to spigot rather than fork
wait how do you mean "what spigot allows"
like what spigot allows you to do
like with armour stands
its pretty hard to make really detailed things
spigot doesn't restrain you from anything tbf
just request features
yeah but its api can be limiting
^
compared to some forks at least
whip open NMS and ask them kindly
like, get mspt?
spigot: you have to use NMS
paper and its forks: getServer().getMspt()
Nothing stopping you making PR's to Spigot to add functionality
true
my net is really shit rn but stuff like this
https://www.reddit.com/r/WynnCraft/comments/bitcnl/this_post_is_to_raise_awarenes_for_how_good_this/
so I cant upload it
Don't copy others code though. Clean room it
is this a new term
I dont mean like that
mean like
is it worth forking
this new spgiot @solemn shoal has informed me about
to add this stuff
i dont see why you'd fork it tho
or should I just do it in the plugin
thats not my point
i mean, he added Creeper.getFuseTime() for me
spigot bug tracker
is this a thing?
TNT.setFuseTime();
package index
does it say what version it was introduced?
no
ok
yeah
Explosive#setYield(float)
aight
TNTPrimed extends Explosive
ok
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
nvm bt is buildtools
anyways that jira link is the bug tracker
just mark it as a feature req
I'm trying to send a packet to teleport an armorstand to a player, but I don't really see any effects. Does anybody know what's going on here? (The code is in Kotlin and the packet can be found over here: https://wiki.vg/Protocol#Entity_Teleport)
val packet = pm.createPacket(PacketType.Play.Server.ENTITY_TELEPORT)
packet.integers.write(0, armorStand!!.entityId)
packet.doubles.write(0, location.x)
packet.doubles.write(1, location.y)
packet.doubles.write(2, location.z)
pm.sendServerPacket(player, packet)```
No I just don't want to show it to some players
ah
It's an armorstand that follows the player, but the player itself doesn't need to see it and when it's spawned the player cannot interact with items properly because the armorstand''s hitbox is in the way
that shouldny block it
