#help-archived
1 messages ยท Page 27 of 1
where?
Dont repeat code
could most likely mean ur repeating a code that a method would fit better
Is there a way to persist a dropped ItemStack on restarts? I want most items to despawn after a while, but one type to stay there, no matter what.
"DRY"
@naive stratus just specified items or all items?
Specific items
@naive stratus save it inside the plugin,and in a config,delete them ondisable then spawn them again onenable..
depending on how you want to do with them
hmm to never despawn?
@vernal spruce tahts bad idea
you cant control entity's drops when you kill it on disable
so hes kinda screwed on that one..
if you have cow, it will drop wool every restart
^
In my case it's dragon eggs. So there will be a very limited amount around.
Yeah I found that one. Doesn't seem to persist it on restarts though. But I will just store it in my db and delete it/create it on server stop/start
@naive stratus save it inside the plugin,and in a config,delete them ondisable then spawn them again onenable..
@fair abyss sadly your theory is still a risk
which
i believe ondisable at the perfect time a player can pick up the item
unless you have a safe,kickall before disabling
actually it was your theory
meaning the item can respawn again
but, if you want mine
you can make your unpickup able item with nms
not sure api provides it, but could be done with nms
I have a problem I cant load my plugin cause it always says already initialized help ls
that usually happens when you save 2 with different names
i sometime do that mistake
or paste the error here
?paste
if you have same named plugin but different named jar
spigot will disable one of them
yep, in the first lines
if not something onenable went wrong..
hmm try remove everything
Started the server and get this error
did you try to run onenable twice?
if it loads it means something is wrong onenable..
In my oneanble method there is only a message, the registering of the class and the calling of a method in another class
The plugin also used to work fine but no it doesn't anymore
chest.setCustomName(ChatColor.translateAlternateColorCodes('&', "&k0&r &cAirDrop &r&k0")); this isnt a thing? how do i change the name that is displayed in the chestinventory
@narrow crypt did you named chestinventory as chest?
so get block's inventroy.
Are you also checking if its instance of chest/doublechest?
i already got that
Inventory chestinv = chest.getInventory();
the plugin just summons 1 chest @vernal spruce
chestinv check setTitle or setCustomName or setName
I commented everything and it still gives me the same error what da heck
@pure pasture well you know what to do,rename the plugin.yml to something different,then save the jar as that name
and try then
is he using olds?
dont know
damn havent used anything below 1.14 since couple months
i especially love 1.15 that added to savelocation to config
chestState.setCustomName("My Chest Inventory Title!");```
google says
yea got it
yeah instanceof chest/doublechest..
just found it
mentioned it but im not sure if it would work
is it possible you need to request an update for that block
^
It's likely you're changing some internal state but the client isn't aware of it yet.
?
I had two plugins from myself loaded
it shouldnt matter
And i just had to change one of the plugin.ymls slightly
chest.update?
do both have same mainclass names?
Yes
thats why..
chest's blockstate .update
I didnt know this was a problem
you're welcome ๐
well now you know,good luck coding further @pure pasture
Thanks @vernal spruce
keep different plugins to different packages
can i center the text too @fading owl
@silk gate right
I'm not sure if you would be able to center the text.
I don't know if the client supports markdown. Likely not.
wiki will say whats max length
then your math knowledge will help you to center the text xd
However my knowledge is limited.
https://prnt.sc/s2bx2a
pretty centered right
nice ๐
decent enough
seems to be +-30px off
also try switching ui scale
see if it works with all 4 ui scales
also nice color choices
hmm what is the event called when a chicken makes an egg?
well u can get a list of events from org.bukkit.event package
Haha
man i love eclipse..
tried getting into it,proved too hard to bother
gave up after i saw it doesn't like the way i get main..
strange,on javadoc EntityDropItemEvent barelly has methods,but in eclipse i have entity/entitytype
I bought 2 plugins ... but I don't see them in my account
your better of talking directly to a staff member... @arctic thicket
staff can't help
you need to talk to the plugin author
but wait an hour first
XF can take a while
Send mails to spigot
i want to learn how to use javascript with spigot
i give up
?
i juist been tryna make a plugin it wont work
can anyone help me?
its pissed me off to mush
@pale plaza you never asked for help here?
much
or on spigot
@vernal spruce No cus it the eazy but never workeed
@oblique sphinx JavaScript or Java?
JavaScript
You need to know Java for Bukkit/Spigot programming
is chicken egg rate not affected by ticks?
wats the best spigot version if u want a lot of plugins?
1.14/1.15 seems to be the best
1.12 seems to be highly targeted but 1.15 seems to have a lot of demand.
yeah, just go with latest one
i'm fairly new here though.
ok fair
or just 1.13+ in general since block API changed heavily in 1.13
gotta love 1.15 adding setLocation/getLocation straight from config
should go for 1.15 or wat?
you can serialise locations in 1 line
you can but its annoying
but not the default way theyre serialized
should i just do 1.15?
yes
also is that how you have ur config structured? @pale plaza
i want to learn how to use javascript with spigot
@oblique sphinx there's a plugin
Drupi
especially if you're just starting out, It'll be best to learn the API from the latest 1.15.2
best to learn? TheSourceCode ๐
@vernal spruce This package test;
import org.bukkit.plugin.java.JavaPlugin;
/**
- This Plugin Was Made By LewisGaming
- Make sure To Check His YouTube Channel Out
*/
public class ScoreBoard extends JavaPlugin{
@Override
public void onEnable(){
First learn java
ok
jeez.. eggs are not affected by tickrate i actually have to wait 5-10 min to test the event
https://paste.md-5.net/iyagumimuf.php @vernal spruce
are you using notepad++ to edit?
Hey Lewis, if you need any help let me know, I wouldn't mind.
@vernal spruce Nope I use Intellij
and found the event nice,entitydropitemevent applies to chicken eggs
@fading owl ok thanks
@pale plaza sadly i use eclipse..
oh what that
Lewis what exactly is the problem or conclusion you're trying to come to?
My Code Will Not Wortk at all
I Get errors about the text
dm so i can send screen shot
will do
?paste
I keep getting java.sql.SQLException: Data truncated for column 'position_y' at row 1 when trying to store x,y,z, for an item - I cannot figure out which data type to use in the table. Tried double, decimal, float, all with different values, but I always get the same. Anyone know how to get around it?
I do. It does not get stored. This is when I try to insert the value.
problem is likely a limitation in size because of data type
Does anyone know how to fix joemarriage plugin?
not best place to ask @tall pewter
I even tried to Math.round it
@fading owl I am
you need to use a float
That's why it says "position_y" ๐
try FLOAT(8, 8) for example
32,2 :p
apologies, yes
8, 8 might be fine
or even 7, 7
-1,000,000 to 1,000,000 seems realistic
I got float y = (float) location.getY(); in code and FLOAT(32,2) in database now.
Still same issue
32 digits seems liek a lot in retrospect
and 2 might not be enough
after the decimal
so try 16, 16
should be more than enough
16, 8 even
isn't the location a double?
i thought it was a float
Its a double
oh sheeet
anybody knows if i can modify the time between eggs on a chicken?
libgdx got me all fkd up
So weird. Nothing seems to work.
@vernal spruce probably have to get EntityChicken and use a method
Show us the code you're using to insert @naive stratus
public EntityChicken(EntityTypes<? extends EntityChicken> entitytypes, World world) {
super(entitytypes, world);
this.eggLayTime = this.random.nextInt(6000) + 6000;
this.a(PathType.WATER, 0.0F);
}
in EntityChicken
public int eggLayTime;
@dusty topaz nvm found that dont even need it
how are you doing it?
im cancelling the event no matter what so im gonna use own timers anyway..
and just dropItem(egg)?
@fading owl https://paste.md-5.net/xazeqisapa.java
@dusty topaz something like that,didnt get to that part yet
is anyone a dev or has been a dev for a minecraft server? plz pm me
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
most of us... if you have a question ask here
your query looks for 8 parameters
but you're providing 12
nevermind
there is an on_duplicate_key
Hello, I just created small plugin but have question. https://pastebin.com/raw/mafdfiGu Should this HttpURLConnection be run in async task? So it wouldn't lag server when there are ton players chatting?
Yes
HttpurlCnnection is blocking
attempts to open the stream, read, or write, are blocking oeprations
Ok thanks, I'll look up that async task
you don't need to set a user agent
@fading owl Like try (Statement stmt = con.createStatement()) {'ish ?
correct
Noted
but use preparedStatement
Oh please do enlighten me
ON DUPLICATE KEY UPDATE amount=?,dropped_by_player_uuid=?,dropped_at=NOW(),position_x=?,position_y=?,position_z=?;
ur expecting that to make use of the initial argumetns
u need to use VALUES(dropped_by_player_uuid)
IIRC
It all worked before I added the positions. I also tried VALUES() yesterday in the UPDATE part of the statement, but it does not work.
This is the way to do it.
I've been able to insert/update drop/pickup fields until I added the positions.
INSERT INTO items (uuid, name, amount, picked_up_by_player_uuid, picked_up_at, position_x, position_y, position_z) VALUES (?,?,?,?,NOW(),?,?,?) ON DUPLICATE KEY UPDATE amount=VALUES(amount),picked_up_by_player_uuid=VALUES(picked_up_by_player_uuod),picked_up_at=NOW(),position_x=?,position_y=?,position_z=?;
also make sure uuid and name are not keywords
in mysql
yeah name is a keyword
They are both VARCHAR with the correct max length for each of them. They should be fine.
i think you're missing the point
your using column called name
when name is a reserved keyword
you're going to have to call it player_name
for example
oh
INSERT INTO items (uuid, name, amount, picked_up_by_player_uuid, picked_up_at, position_x, position_y, position_z) VALUES (?,?,?,?,NOW(),?,?,?)
also
u insert amount twice
for param 3 and 5
That's because it's also in the UPDATE statement
?,?,?,?,? = 1,2,3,4,5
Oh wait, I see what you mean
yeah
so u neeed to use values
to reference that column
when updating
or provide another parameter
https://pastebin.com/raw/ahrF42hH Can anyone tell me what's wrong with that? I am getting "Forbidden" response after sending HTTP POST request/writing in chat. Without async task it works.
try this @naive stratus
private void updateItemDatabaseEntry(UUID itemUUID, Material material, int amount, Location location, UUID playerUUID, boolean pickedUp)
{
String query = "INSERT INTO items (uuid, player_name, amount, picked_up_by_player_uuid, ?, position_x, position_y, position_z) VALUES (?,?,?,?,NOW(),?,?,?) ON DUPLICATE KEY UPDATE amount=VALUES(amount),picked_up_by_player_uuid=VALUES(picked_up_by_player),picked_up_at=NOW(),position_x=VALUES(position_x),position_y=VALUES(position_y),position_z=VALUES(position_z);";
try (PreparedStatement statement = plugin.getConnection()
.prepareStatement(query)) {
statement.setString(1, pickedUp ? "picked_up_at" : "dropped_at");
statement.setString(2, itemUUID.toString());
statement.setString(3, material.toString());
statement.setInt(4, amount);
statement.setString(5, playerUUID.toString());
statement.setDouble(6, location.getX());
statement.setDouble(7, location.getY());
statement.setDouble(8, location.getZ());
statement.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
}
}
note that name is now player_name
one thing that i find odd about ur structure too is the variable column name
that is quite odd
generally you would have 2 columns or even 2 tables
i.e time_of_event (now), and event_type (drop, pickup)
yeah so this would be a problem with my code
picked_up_at=NOW()
since colum is variable
This works:
String query;
if (pickedUp == true) {
query = "INSERT INTO items (uuid, name, amount, picked_up_by_player_uuid, picked_up_at, position_x, position_y, position_z) VALUES (?,?,?,?,NOW(),?,?,?) ON DUPLICATE KEY UPDATE amount=?,picked_up_by_player_uuid=?,picked_up_at=NOW(),position_x=?,position_y=?,position_z=?;";
} else {
query = "INSERT INTO items (uuid, name, amount, dropped_by_player_uuid, dropped_at, position_x, position_y, position_z) VALUES (?,?,?,?,NOW(),?,?,?) ON DUPLICATE KEY UPDATE amount=?,dropped_by_player_uuid=?,dropped_at=NOW(),position_x=?,position_y=?,position_z=?;";
}
try {
PreparedStatement statement = plugin.getConnection()
.prepareStatement(query);
statement.setString(1, itemUUID.toString());
statement.setString(2, material.toString());
statement.setInt(3, amount);
statement.setString(4, playerUUID.toString());
statement.setDouble(5, location.getX());
statement.setDouble(6, location.getY());
statement.setDouble(7, location.getZ());
statement.setInt(8, amount);
statement.setString(9, playerUUID.toString());
statement.setDouble(10, location.getX());
statement.setDouble(11, location.getY());
statement.setDouble(12, location.getZ());
statement.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
}
It was just the bindings that were wrong. As I mentioned before, I did try with =VALUES() in the UPDATE statement yesterday (When initially creating this statement, so not related to this issue), but that did not work. NOW() is an SQL function and that gives me the current timestamp, so I do not have to provide anything myself in code. I know when I run these queries that it happened now, so I just insert or update either picked_up_at or dropped_at with that sql function.
gotcha, so amount was in the wrong place. you definitely shouldnt have variable columns like dropped_at aor picked_up_at, that definitely seems wrong since assumingly those will now have null values
also, i'm not sure if you notice but
statement.setString(4, playerUUID.toString());
statement.setDouble(5, location.getX());
statement.setDouble(6, location.getY());
statement.setDouble(7, location.getZ());
statement.setInt(8, amount);
statement.setString(9, playerUUID.toString());
statement.setDouble(10, location.getX());
statement.setDouble(11, location.getY());
statement.setDouble(12, location.getZ());
there are 4 duplicted parameters
which was why i indicated to use VALUES
dont forget try-with-resources
What are the benefit of try-with-resources?
Don't save UUIDs as string, save them as binary
with a try-with-resources your prepared statement will be closed
prepared statements implement Closeable
so those resources need to be closed
UUID is just 16 bytes of data, saving them as String is 46 chars
same with connection
plugin.getConnection() makes me think ur not using pooling though
Bonus info: Never worked with Java or Bukkit until yesterday - So please do guide me ๐
ah
So I am not even sure what "using pooling" means
@sweet hemlock - I'm a backend developer for a living(PHP ๐ฆ ), so it's not totally alien to me ๐
So in case of MySQL you can do UNHEX(uuid) to save the UUID as bytes, and you feed the the string without dashes
pooling is leaving connections open so you don't need to open new connection every time you want to update something in the database
And then you can retrieve the UUID as HEX(uuid)
Before everybody saved uuids as two longs
Btw is there any advantage saving them as ints ๐ค
4 ints would be 128 bits
Combat with vanilla format, the size is the same
2longs would be 128 bits too
oof
Do you have any good examples of connection pooling for Java that I can read?
and 64 for significatn
Is there an internal UUID support for SQL databases now?
well both signed unsigned uses 32 bits
Postgres supports UUID out of the box
Will look into this UUID issue afterwards. I'm glad you guys mention it.
Its pretty nice
well
o
problem with using binary
It doesn't matter if you use 4 ints or 2 longs, it's all the same
Simplifies some of my stuff
is visual representation
Just mojang uses 4 ints now for scoreboard stuff
its faster
I need to see if MariaDB has one
but oof
MySQL doesn't have one
Binary data is tables is just always meh
inb4 opens a ticket on MariaDB for UUID support
Or well I could be out of the loop, I only use Postgres nowdays
Can anyone please tell me what's wrong with my code? https://pastebin.com/raw/ahrF42hH I am getting "Forbidden" as I write in chat aka sending HTTP POST data. It works when not using async task.
The only DB worth using
:D
@idle tulip Forbidden is a response from whatever you sent the post request to
Yes, but it works when it's not in async task
i took it out before pasting it to pastebin
okay
I fell in love with Postgres after learning about window functions and CRE, never looked back to MySQL after that. Tho that was few years before but MySQL is catching up with the features
Tho it will never be the same
RETURNING ๐ป
pg FASTE
Pg makes everything easy lmao
Always been possible with the UNHEX too
and binary to UUID
Looks like the UUID/BIN function is cleaner since it takes dashes into account as well
Sounds good
before you had to remove all dashes and do extra computations
Just move to pg ;) Lmao
xD
So many applications use MySQL/MariaDB, namely CoreProtect, so I'm sticking with one for now lol
Mhm
My plugin from interacting with a certain item but when i switch worlds they can interact with it help
MySQL is easy to use
kesps players*
I just find pg more dev friendly when doing SQL
keeps*
How does your plugin prevent item interaction?
@idle tulip I already told you
@silk gate i am literally using /:id/:token, im saying that it works nicely when it's not in async task
Hello guys, Im one of the devs of BetonQuest and we have had a lot of async related exceptions in 1.15. Has the API changed in a way that is stricter towards sync / async code? We couldnt find stuff in the changelog.
It get's the name of the item and if it's this item it blocks the interaction
and its definitely 403ing?
yes
and it doesnt when sync?
exactly
you're 100% sure it works fine when sync?
yes
running async wont cause this
just onEnable and onDisable
arent webhooks on the subdomain canary
show the exception
you're 100% sure it works fine when sync?
@fading owl yes, i can see messages in discord text channel
quick sanity check
con.getResponseMessage() returns just "Forbidden" i'll see if can get more details
PlayerFishEvent fires when the player casts the rod right
not just when actually succeeding in reeling back a fish?
looks like it has a ton of states
public static enum State {
FISHING,
CAUGHT_FISH,
CAUGHT_ENTITY,
IN_GROUND,
FAILED_ATTEMPT,
REEL_IN,
BITE;
private State() {
}
}
so probably fired at the start of fishing, while fishing, and when caught
getLogger().info("RESPONSE: " + con.getResponseMessage()); getLogger().info("RESPONSE: " + con.getRequestMethod()); getLogger().info("RESPONSE: " + con.getResponseCode());
All I can get is that
[20:26:15 INFO]: RESPONSE: Forbidden [20:26:15 INFO]: RESPONSE: POST [20:26:15 INFO]: RESPONSE: 403
@fading owl Do you know how I export the jar file with HikariCP? I get java.lang.NoClassDefFoundError: com/zaxxer/hikari/HikariConfig - I can find a few other people that mention the same, but some are really old posts. Thought I'd just ask here before I dig into those.
depends what you're using for dependency management
or if you're using it
i.e maven or gradle
I'll look into Maven. Saw that mentioned at the Spigot forum. Thanks.
Maven 2020 :/
what do u use alternatively troxx
Gradle obviously?
and do u get ur gradle dependencies from mvnrepository or gradlerepsotiry
crazy gradle
:D
that doesnt make maven good
haha nah i know
Huh what type of question is that
kotlinscript gradle
i thought gradle only supported groovy and kotlin, or is kotlinscript == to kotlin
yes
yeah thats one nice thing about it
not the one
but one nice thing
one of the downsides of maven for sure is the verbosity
i don't understand why it works in sync but not in async
sync / async wont affect it
@fading owl - Is there a way to generate the skeleton of a pom file? What's the best approach for that part?
How can you use runTaskAsynchronously in onDisable? (org.bukkit.plugin.IllegalPluginAccessException: Plugin attempted to register task while disabled)
but if you use intellij or eclipse
it will create one by default
when creating a project/module
I'm using Eclipse, but there isnt one.
Thank you
@naive stratus Iโd recommend gradle over maven though
Gradle is good too, might be easier to learn.
I moved to Gradle because it's easier to compile without downloading additional apps
Defo
speaking of, I should look into GitHub Maven package repository feature
Imagine having to write more than 2 lines to add a dependency
True true
I love the one-liner of gradle imports
Yeah same
It is quite nice
The ability to easily write plugins is nice too
Task execution order can be hard on the head though
Ouch, this is a lot to chew lol
Really unsure about that pom file since it's completely missing. The archetype:generate command didnt make me feel any more safe...
depends on the situation
Hey Weaves.
So I have a buyers and he want a refund because the plugin is not what he expected. Basically he want a challenges/mission and you can tell from the resource description that is not the function of my plugin, and he keeps blaming my resource description for not detailed, and saying that I'm immature or something like that.
Hey guys. I really really want to get a hook on just the PluginManager#fireEvent call โ is there any chance of that happening?
Yeah man, 1 star false review, how bad.
He act like he doesn't do something wrong.
ok now i try looking and spent alot of time looking fort a f top command what works But cant find any who got any recomendations
Uh well I mean try report him or something.
JEEZ MY SPELLING
๐ณ i was going to say
@troxx So, there's all sorts of Events from that base class. But there's no way to listen to "everything" without apriori knowledge of what the events are. Yeah sure, you need to know the concrete types to operate on them, but I'd still like to know what types / how many we "don't" know about.
That's impossible right now AFAICT. Which is really weird for an evented system, because there's typically a firehose somewhere right?
wait what are you trying to accomplish?
so, don't refund him?
that is up to you
His fault he didnโt read it properly
I just don't like he's disrespecting me
With getStorageContents() from the inventory class, how are the items listed? Does the hotbar (if player inventory) come first then the rest of the inventory?
if the review breaks a forum rule I can remove it but if it is just a "false review" there is nothing i can do.
So we're trying to stream all events out of our server to our event sourcing system
Cool, thank you @wanton delta
anytime there isnt an item it is null
I've got a bunch of them - but if I put a new plugin in we'll miss new evets
gotcha
@heavy isle Are you calling Bukkit events with the callEvent method or what
Itโs unclear what you are trying to accomplish
I'm not calling events at all ๐ I just want to listen to all the events and stream them to a separate system
Well just put up an event handler for each event?
๐
that's embarrassing
@Listener(Event.class)
Could someone check if a resource is still up for me
if that worked, I'd be golden. but it doesnt ๐ฆ
since I'm pretty sure either their account is deleted or im blocked somehow
im not sure why youre doing what youre doing
what do you mean each event at compile time...
yeah, but again, I have to know about each event at compile time
@heavy isle why?
so, think abotu it
i wire up all events right now. BlockBreak and what not
cool. I'm "listening" all events that go by
now a plugin comes along and gets installed, and has it's own custom events it fires.
yes
I didn't know about that before in my plugin, therefore I will not see it go by
not true
you add the plugin as a dependency
He doesn't want to do that.
heh, thanks Zax
He doesn't want to hard-code every event
He just wants to log every event that happens, no matter if it's a custom one from another plugin.
I want to use the event bus... like an event bus ๐
they all implement Event
welch Iโd say that you should hard code them. Trying to listen on every class extends Event class or something is not good.
ok, but not the base Event explicitly then?
if you listen on PlayerEvent, BlockEvent etc you'll get more data
Troxx I get ya, and I get the risks. this is what I do for my dayjob ๐
How would I be able to download Java 1.8?
I'm still pretty new to plugin development, is there a way to add/replace plugins without closing the server and reopening it?
im not sure why you would want to listen on other plugins events when you dont know what those events are or what they do
@inland heron Yes, but it's not recommended. There's plugin manager plugins like Plugman.
it doesnt make sense to me
how are you going to manipulate them?
dont use plugman or /reload
guys. guys. okay, plz, listen to me
Huh
I am a software engineer. I do this. for a living. I know the risks. I know high performance software
I get why you say that ๐
So why do you ask us?
But plzzzz let's step back from that. I have the need. It's real
Because I don't want to write a PR that gets rejected because everyone thinks I'd ont understand
it sounds like a very peculiar request
I thought software engineers was the best at solving problems etc
youve not said what you want to do with this
you have just stated you want to listen for every single event
public void event(Event event) {
}``` Does this work?
I'd be happy to use reflection on boot to change the contract, but the CraftServer pluginManager was changed from an interface to SimplePluginManager's concrete type
@radiant pollen unsure
so no amount of magic can change that reference or augment it
There's no generic event that's called for every event?
Martoph I have โ I want to stream all events out of the server. If I don't know what they are and can't serialize it, I'd like to know that too.
Nope @radiant pollen - and for good reason
This is what you don't want people to do 99.999% of the time
i wanna be that special .001 ๐
Hm would packets be something maybe?
hmmm haven't thought about that route
ooo
i like it
or even just the nms data actually
With a packet listener you could listen at everything that happens on the server
well, yeah. that might be a bit much
I'm really more focused on the events, but if I have to drop down I could
it'll just get reallllllly noisy
If you're trying to listen to Events, packets won't really work.
o.O then whats the difference between listening for every event
what does that even mean
im pretty sure listening to Event works
Events can be anything, they don't have to be things that are sent to or from the client
Therefor you can't just listen for packets
welch the ultimate way would be to make your own fork of spigot and change some of its code
...
not another bukkit fork
yeah, no
plz
this is OSS right? like, we want a community
Fork of stellarspigot, imagine
right?
@heavy isle Why does the code I wrote not work?
this whole idea sounds really obsolete, i still dont understand why its necessary
which idea
Zax it doesn't fire
Is there something I'm missing in the docs for why that doesn't get called?
imagine the day spigot having all the packet fields on public
listening for every event from other plugins
Why though? I'm confused.
Martoph. it's how event systems are built. it's how you stream data in software
just listen to the event you need
You should be able to listen to a generic event and get the handlers even though you don't have the other plugins as dependencies.
butttt I don't know all the events beforehand
no i get that you want to stream the data but for what purpose?
Zax - last time I tried it didn't work
what are you trying to achieve?
Do you actually need to listen for every single event or do you just need to listen for a list of events?
I'd like them all
He wants to log every single event to a stream, for every event on the server, even plugin-defined events.
Right?
@wanton delta I can't explain it any lower. I want to stream events from Bukkit to a different server / service / etc
no i undersatnd that
have you not tested what zax said
@EventHandler
public void event(Event event) {
}
but i dont understand why
Yessum. Thx @radiant pollen โ and the generic doesn't run
im pretty sure that works
nope
Cable nope
i dont see the purpose in that
it deosn't. at least on 14.4
It has to do with handlers
it works on sponge and velocity :p
I know @wanton delta but can we move past you not seeing it?
I know it does
It's a good call to NOT do this in almost every case
This is spigot lmao
no i see it perfectly
ikik
you want to stream events to a different server
but i dont understand why
its sounds messy and complicated
No wtf. No one said that.
not to another MC service
Ahh... Well the only way to do this would to be to have a predefined collection of events. You are able to actually group up multiple events in a single event handler
@wanton delta I can't explain it any lower. I want to stream events from Bukkit to a different server / service / etc
@heavy isle
he literally did lmao
so I can analyze the data. we've got live updating on a google map. I can show where things happen. etc
google map for minecraft?
yea
never heard of that lol
Though again, they need to be predefined. So if you're just looking for Bukkit events, then you'll have create a list of the events yourself
hell, want to see it?
you should focus on events that you need rather than all of them at once, surely you dont need all of them?
a google map?
yeah. one sec
dynmap cough
RegisteredListener listener = new RegisteredListener(this, (listen, event) -> onEvent(event), EventPriority.NORMAL, Main, false);
HandlerList.getHandlerLists().stream().forEach(handler -> handler.register(listener));
Or smtng
Found it on a thread
who know any f top plugins i try look for 3 hour now
what is f top
Factions top
Faction Top
your factions plugin should have a command for that
he removed the skidded anticheat with his alt's false review, yay!
otherwise there is no such plugin to give you that one command
sooo im having trouble using the kotlin library from another jar
has anyone been able to do this
what faction plugin do you use
eventhandlers with highest priority are last to be executed right
Reverse ?
wouldnt make sense because then youd have lower priorities overwriting what you just did
no im pretty sure highest is last
i know this is silly because i could use that logic to figure it out
Oh yeah its last
but i wanted to make sure there wasnt somethign i was missing lol
MONITOR should be last?
yep
but monitor should be exclusively used for logging
i am aware
not like many plugins are using it tho
still cant any working f top plugins
top?
Factions top
oh ๐ค
lewis, youve repeatedly asked for us to search your plugins for you
i think you need to step up the effort a lil
Obviously
Sure
@naive goblet THANKS Hope it works
Yeah
beauty
so
that's an easy one, which plenty of folks do
what's nice tho, is I've got it setup where we can show who did what, where and when
like, pins, actions, destroyed, ownership, etc etc etc
Is there a minimum age requirement to have an account on spigot?
yeah 13 i think
k but that's probably lol
14 maybe 
one upper eh? ๐
13 probably
so, streaming. streaming is good. we're streaming via protobuf / grpc / nats events
Tried google?
read TOS
well id assume 13
i'd like to listen to everything
because thats the law in most places
alright cool
so can I change my date of birth pls? mine is incorrect
who do I have to speak to for that?
my entity equipment packet listener is being cancelled for no reason and im ๐ญ
F
nowhere in my code do i run setCancelled :///////
so its being done via bukkit api and idk what method in bukkit would cancel the event :(
Only god knows who cancelled it
correct
I cancelled it >:D
{ a = 122, b = { g = { name = "ARMOR", ordinal = 1 }, h = 3, i = 4, j = "head", name = "HEAD", ordinal = 5 }, c = ItemStack{DIRT x 1} }```
why does it Cancel it ๐ญ
Is weather specific to certain biomes
who could code me a faction top plugin for under 5 GBP
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
ok
@frigid ember weather is not specific but some biomes treat weather differently
e.i. deserts wont show rain when its rainign
above a certain height you will get snow instead of rain
some biomes will show snow instead of rain
well there goes my idea of only changing weather in certain chunks
is black spigot good or bad
very bad.. well depends how you look at it
no its just taking money away from developers which depends on how you look at it deserve it for their work
wait which black spigot are we talking about
Plugin buy information is public
yeah
its real, but its premium plugins which are leaked and pirated
@pale plaza donโt use black spigot. Itโs never good to be illegal
๐ค illegal
Ok
against tos sure, but illegal ๐ณ
Itโs piracy
Who could code me a f top plugin
@frigid ember So itโs legal?
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
it wont work
Likely due to the banning of amazon server addresses
ah :/
@pale plaza like ive said before, we're not your personal server builder. if you need plugins google them. ive only seen you ask for plugins here
reloadConfig(); works for anyone? I change value in config.yml and then after reloadConfig(); shows still same value not new value
its legal to the point of where copyright comes in
Every question he's asked could be answered with a "let me google that for you" link...
@frigid ember its piracy, not sure where the confusion is
So it's illegal right at the start, lol
It's illegal in almost every country
stealing software is illegal
It's illegal.
i dont know if you understand
@frigid ember It can either be legal or illegal decide yourself
or spigot wouldnt exist
how is spigot piracy?
Spigot isn't piracy. Black spigot is.
i never said it wasnt
You said it's a loop hole
But it isn't
It's just the proper way to distribute mods
i would consider it to be ๐คท
Separate to the original software
https://pastebin.com/raw/8i5xfaRy why this reloadConfig(); doesn't work? Still shows old/same value when i change value in config.yml
If you have to do some weird hack to distribute the software because you can't directly edit it then yeah that seems like a loophole to me
You need to reassign your config field
@idle tulip don't store the config in a variable, use getConfig() every time
It's not a weird hack...
@wanton delta i did ask for help on making my score board
It really is
It's how you distribute mods
just because its mainstream doesnt make it not weird or not a loophole
Guess mods are all distributed through a loophole
as this can
This can't be "fixed" because it's not a copyright violation
I'd say a loophole is more something that is against the meaning of the law but technically allowed
It's not against the meaning of the law tho
i would say people who distribute software dont always intend for peopel to patch it and modify it
yeah that's why I wouldn't consider this a loophole
The law says don't distribute stuff you don't own or have rights too, so spigot doesn't do that
It's not a loophole.
At least here in the EU, modifying stuff is a consumer right
last I recall, mojangs EULA states that you're allowed to mess with the software how you please
just because you put YOU CANNOT DECOMPILE THIS PLUGIN doesn't mean you suddenly have copyright law
i dont think its worth the time and energy to debate what its called lmoa
MiniDagger
That roo
My location is public knowledge
I'd ez guess on the fact that he's probably drunk
was I right
I wanna say I am not drunk, but then I look to the side and see 3 beers
Was watching LEC finals with friends
And yes, am from cologne, Germany, the capitol of beer
theres a city named cologne in minnesota lol
US is filled with stolen names due to immigrants.
Canada is france tho
wait so because you're saying that most plugins are protected by copyright.. can i report every skidded anticheat
@idle tulip don't store the config in a variable, use getConfig() every time
@sour dock thank you. One question - I use ServerCommandEvent to handle getCommand() but in console it comes with "Unknown command. Type "/help" for help." how I can cancel that unknown command message?
There's a Paris, Stuttgart, Manila, and Damascus in my State. Sorry off topic. lol
Making different anticheats is just like making different toilet paper brands
If somebody copies your code without your consent, you can use tools like the DMCA to go after them, sure
well, plugin priacy is a complex topic, but, that's a discussion that would get me in lotsa trouble, plus IANAL, so, yea...
register it as a proper command in onenable, don't use events for commands @idle tulip
its called competition
@idle tulip Use the command registration system rather than listening to the event.
- mumbles something about the GPL and plugins *
competition isnt piracy lmao
Everything you make is automatically covered by copyright law, unless otherwise specified as being public domain or it being a part of a different license
But it's only server console command, is it still necessary to register that command system?
genuinly curious, I've read people say technically plugins must be GPL because bukkit is GPL but that doesn't make sense to me
That's GPL 101 for you ๐
@idle tulip Yes, it's easier. Makes your plugin work better with administration plugins and makes it show up in /help etc.
It's the cancer of licences, it spreads downstream
If you link against GPL, you are GPL, that's what the licence says pretty much
Since you form a combined product and that product is covered by the GPL
I thought that was only for for "forks" of software, not addons that are loaded by the software but otherwise completely separated from it
Then how do paid resources work?
I guess I'm wrong
I mean if it's not shaded... does it matter?
well then paid resources are technically illegal
Add-ons/plugins are covered by the GPL since you link against the lib, there is no class path exception in bukkit
no
You can sell things that are open sourced, that's no issue
imo all paid resources should be GPL anyway but ยฏ_(ใ)_/ยฏ
Just look at Redhat
Fuck redhat for selling out to IBM
Hahah
My company went full team red to get away from team blue
Now we just gonna dump that shit again
IBM trippled prices after they brought redhat
do yall know what wouild cancel an entityeuipment packet
because im not cancelling it to my knowledge
{ a = 122, b = { g = { name = "ARMOR", ordinal = 1 }, h = 3, i = 4, j = "head", name = "HEAD", ordinal = 5 }, c = ItemStack{TNT x 1} }```
I mean at least you aren't stuck in Windows hell atm
Add a breakpoint?
guys can i ask here for help for a plugin i made that got rejected ?
doesn't ProtocolLib have a thing to tell you what's listening to what packets?
Every firm in Denmark uses Microsoft products for everything
I'm not entirely sure
I've learned to like it more than before, but coming from a Linux background there's still some things I'd like to see changed
B2c first, internal shit later
I wrote a batch that's gonna migrated all our costumer's
I don't develop enough outside of spigot to know what you are talking about. Haha.
I swear I'll be watching every single line of console when I execute that in prod in 4 weeks, lol
Hahah
Writing a few million users to graph gonne be fun
guys what does "All resources must retain an unobfuscated package root" mean ?
you cant have something like a.a.a.a.mainclass
My.shit.premium.plugin.a.b.c
Not just a.b.c
So that stack traces are at least somewhat useful
But like, just stop obfuscation
ok so i have to keep my main class in a clean path?