#help-development
1 messages · Page 1931 of 1
then dont cancel the event
i removed the cancel and it still didnt work
didn't drop anything?
your code can be improved a lot in terms of readability
idk, it is pulling a lot of instances from my config class where i store all my variables and config options
debug it, add debug messages on every condition
pretty sure something is not getting fired from your if else statements
mkay ima test it out with all my messages
please use methods
So I got a function getFruits which returns a mutable List<Fruit> , In the fruit class I have a method makeApple which gives me an instance of a Apple class.
How would I do somethind like
val apples = getFruits().onEach { it.makeApple() }
and have the variable apple be of type List<Apple>
@ me
for the sake of readbility
kotlin btw
so it completly skipped the for statement and went down to the if statement doing the random number drop math
then I'd debug it there if its getting skipped
wdym? it skipped my debug messages too
i see
.
try adding more blocks to your key section
how can I get chat color of a string?
okay now its trying to hit my else statement to drop only one item yet it still drops nothing
predefined string?
like message from AsyncPlayerChatEvent
haven't tried doing chat things, you may try #getFormat or #getMessage
thats from the docs
what line is that
79
i commented it out and then just added the drop amount to be 1 and it still doesnt drop anything though
could it possibly be setting Material drop = Material.AIR causing the issue?
get format is just getting how chat is formatted not the colors in chat
then use the other one
get message just returns the message not the color
when they send the message does it include the "&colorcode" when u get it through #getMessage?
no its a formatted chat color message let me try to strip the colors and see what I get
so #getMessage just sends a stripped color?
to console yeah its stripped of its color, to chat is has all the color, ill show you what I see
thats what e.getMessage is
sigh im about to summit1G my monitor
how about you send me your src let me debug it while I have a lot of free time
is it on github?
sure gimme a moment to push it to github
aight
are u using any items for breaking the ores or just normal itemstacks
just normal itemstacks, but i do have a custom item in there as an option for whoever wants to use it
it still uses the itemstacks though,
oh you're using commands to toggle it on
mhm theres the main command /as to turn it on and off, then asreload to reload the config and /smelt {name} to recieve a pickaxe that autosmelts
What the difference between: Class<?> clazz and Class<T> clazz?
they have different uses
And thanks for answering
you might wanna check java docs
public class Service<T> {
private final Set<Object> services = new HashSet<>();
public void register(T service) {
this.services.add(service);
}
public void unregister(T service) {
this.services.remove(service);
}
public T get(Class<T> service) {
return this.services.stream().filter(clazz -> clazz.getClass().equals(service) || clazz.getClass().isAssignableFrom(service)).map(service::cast).findAny().orElse(null);
}
}
What do you think?
I'd use Map
Okay, why?
Im open to recommedantions
I just ask to understand your idea
Eh, do avoid unecessary looping all over the time?
Oh i catch it. Like Map<Class, Object>?
Yes
val?
kotlin
@solid lion
your code is logic mess
100% will not work, after debugging it myself
I guess you gotta rewrite your code, I managed to make it work
fixed the problem your having, you gotta rewrite it yourself . also the items that is being retrieved from the config are never gonna be used unless you make a list outside of the forEach and assign it from there, the main culprit you're not having any drops cuz ur cancelling the event and setting your variable drop to Material.Air, your debugging messages never get sent Idk what utils ur using for that buts it not working and most of all your if else statements are in need of rewriting they are logical mess and thats the reason its not working, your getconfig for retrieving the keys doesn't work so I fixed it in there
really noice :D
?paste
Anyone know why this wouldn't show the player or hide the player properly?
It seems to hide them but never ends up showing them
create a runnable that would invoke #showPlayer
Yes but that was never necessary in the past?
retrieve the player from the map
Thank you i am already planning on rewriting it, this was my first plugin and it was teaching me to learn java so im still trying to learn better habits and create reusable code 🙂 @sharp flare
wdym
happy to help, goodluck! 🙂
the one your passing to the parameter of #showPlayer or #hidePlayer is the one that will be hidden to all online players
Its taken me 3 years to get it that far lmao
LOL
can't believe I did that
that's what I get for writing a plugin at 10:20 pm
thanks
no problem 🙂
should be toVanish#showPlayer(plugin, player to show)
just change your toVanish variable to online for readability
Hi, so I just used custommodeldata to make a new item. I made a dagger, and it’s overriding the iron sword model. Is it possible to make this dagger independent? As in it can’t use any sword enchantments, and is identified as an independent item
How can I open a link for the player? I've looked at some threads that say it's only possible when the user explicitly clicks on the link in chat but I know that's false because Hypixel has features where you can click an item in a GUI and it opens a link which is exactly what I want to do
I wonder how hypixel does it then
Oh
I think I might be mistaken actually
LOL IM SO DUMB
They use a book
Sorry
hello is there a way to #938875530378366997
He literally said how to do it
Literally the first link
Is the spigot forum
Are u familiar with java?
Gone, reduced to atoms
which's the difference between creature and entity?
does EntitySpawnEvent only detect entities spawned naturally?
Or also spawned with spawners
What is general consensus for libraries? I have one Core plugin with libraries shaded inside JAR and my other plugins are using this Core plugin.
Is it better to use that new mechanism for libraries introduced with 1.17 so libraries will be loaded from Maven central at runtime?
Dismembered
it is better to use the lib feature by the spigot 1.18 version.
public void onSpawn(CreatureSpawnEvent event) {
System.out.println("test");
if (event.getSpawnReason().equals(CreatureSpawnEvent.SpawnReason.NATURAL)) {
System.out.println(event.getEntity().getName());
}
}```
It does not detect mob spawning
am I doing something wrong?
Kk
I have a noob question, if I wanted to damage a player every 1.25s when he has a certain state, where would I keep track of this time.
Thanks! This looks promising
yw <3
how can i cancel the map render task?
Ok
So if i stop rendering it , the image will disappear or stop updating (freeze)?
I was trying to make a push command but this isn't pushing
public class test implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
Player player = ((Player) sender).getPlayer();
player.setVelocity(player.getVelocity().multiply(2));
return true;
}
}```
lemme try that
the reason it wasn't pushing was because of I haven't said where to push?
Yes
remove your getPlayer
redundant
casting sender is enough
Name your class Test not test
UIContainerElementPane<T extends UIContainerView<? extends UIContainer<T>>> extends UIContainerElement<T>
mmm yesss
generics
it's just for testing when I finish I'll delete it
so doesn't rlly matter
oh okok
Never start your class name with lowercase
only that one is lowercase
?resources
?learnjava
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
.....
How do I get the last player alive?
That ain't gonna work
Why tho?
Hmmmmmmmmmmmmmm
I'll give that a try
Also
1 more thing
How do I reset a countdown timer I made
We need ur code
So we can do shit
Yes man
Line 1750277492
The if else statement
Got a null value
@blazing rune get out of my dms
Rather quickly
?paste
Set the countdown variable to an number
Wai
And rerun the scheduler
I did that
But at some line it said like smth wrong
O ok
?learnjava
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
:/
First learn java
Yes i'm doing that-
Which one
Its all in my main
Ok
Yes
For me I find it easier to access
??paste
?paste
i am working on a command which sets nearby blocks on fire so is it possible to get near by blocks location?
Hey guys, I've found that my plugin is incompatible with another, but I have no idea why. What are some steps to take so that I can figure out what's causing the issue? I don't really know where to start since the error is quite strange:
Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "org.bukkit.Server.getPluginCommand(String)" is null
Normally you'd see that one when you forget to put your new command in plugin.yml
but blocks are some times placed at different y levels
do you rly use the exact same command name in your plugin.yml and in the getPluginCommand ? also: does the other plugin have the same command name ?
also: does the other plugin have the same command name ?
Yes, but this is the only plugin where both have the same command name but there's an actual conflict that causes one to not load
There's another where both share a command but they work fine
ok
i think you cant have 2 plugins that use the exact same cmd name and also try to register them .... you should check what getPluginCommand returns and only if not null set listener
make 3 loops with x y and z and if block is equals to air skip and continue with other blocks
How come there are 4 plugins that have the same command, but three of them work fine with mine, and one will cause mine to not load?
Is it because their actual command is something like /command209487209834 and they added an alias for /command ?
also how can i look for block in front of players
if 4 plugins have the same command name and 3 of them work.... you should concider sending the plugin yml of them
ok
wtf is this code
;-;
getRelative, and check if above the block is air, set to fire
you can specify your radius in your #getRelative just gotta loop it
what if i have an acronym
for example
o
why though
so I should have a 25 letters variable instead?
I can just use a comment?
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
depends how well you can understand concepts for programming. If you are really good the last link then
since that is the official Java API 😛
otherwise there is many sites other then what was linked in regards to learning Java
well JS is no where the same as Java
python isn't quite the same but at least with python you have functional programming to a degree down which Java does support, but ideally should be doing OOP with java 😛
Is there a way to modify hitbox sizes without using nms?
huh actually how can it be done at all
not that I am aware of
looking quickly at forum advice people seem to say you have to raytrace it
it gets you the hitbox
doesn't let you change it API wise
I suppose you could do that and just apply the hit if it is close enough
well that's not great
no it isn't lol
god what a mess
the stuff required to make custom models get displayed in-game makes my hair go white
it's not hard it's just very, very dumb
yeah I am sure for others too 😂
it's like
What’s this about hitboxes
convert the bbmodel json format to the minecraft json format but split it up by bones
then store your own data about how they relate and move
then animate it tick by tick
by rotating armorstands
then if you want damage you're just going to have to raytrace and I guess scan projectile proximity
there has to be a better solution for hitboxes though
well hitboxes can be changed as they are hardcoded, just have to find where it is at
so NMS is needed and possibly reflection
yeah won't change how the client sees it
but for some things probably doesn't make a difference
like an example is the hitbox for the wither doesn't include the heads on the sides but server side you could make it do so and thus apply damage in that way 🙂
You’d have to rayTrace to apply damage but yeah
a hitbox plugin is probably one of few plugins that can both be a plugin and clientside mod
downside of the mod part is that it would only really work on your server and not anywhere else
public class JoinEvent implements Listener {
@EventHandler
public void onJoin(PlayerJoinEvent event) {
event.getPlayer().setResourcePack("https://www.dropbox.com/sh/44cki6n7xai7dir/AAAb1bKbA8CysgOonAnZEPdza?dl=1");
}
}
``` so when i do this it works technically but doesn't change the texture for sugar but when i put the resource pack in my .minecraft it loads the texture fine?
not sure if you can force change a clients texture they currently have set
I think do it in playerloginevent
but if they dont have one set apart from default
doesn't mean you can still force change it
well other servers do it
yes, but not without the users consent
maybe outdated versions you could still do that like 1.8
no it does the this server recommends the use of a custom resource pack and the yes and no thing
but shouldnt it work fine because it still load the resource pack and comes up with the yes or no thing
yeah but the texture for the sugar doesnt change where if i add it to client side through .minecraft it works fine
if it isn't forced, you can't arbitrarily change the texture pack mid game
that is why the forcing of it is done on the login
if the user hits no, you can have the option to kick
but, after login though you can't force the changing of it
thats not the problem when they hit yes the texture doesnt change
Have you already tried applying it in the playerlogin event instead of join? Idk if it may help
i havent yet
login is the ideal place, because join is after login 🙂
That's what i thought
also you can pause the connection for login for a longer period of time
then you can if they joined
which is nice if its taking them a bit to download that resource pack
for the join part, think at most you can wait 30 seconds before the connection is closed where as on login you can wait as much as like 30 minutes, I would need to relook at the code to confirm that
but it is significantly longer for the login part in terms of waiting
also, it doesn't cause the server to lag on waiting on the login vs the join part
im kinda new to this do i just change PlayerJoinEvent to PlayerLoginEvent?
I don't know how your code looks, but yeah that is generally sufficient
In a way, yes you can. You send the download resource pack pop up if they say yes they enter else you can kick them for denying it.
as far as I am aware this applies in the login or joining portion, I am not aware of it being possible after those phases I could be wrong though
Oh right ye.. hm. As it's possible during login I wonder if you can do it outside of.
their code above has it being done in the middle of game play
which I am sure works but doesn't force the client to change packs either
Mojang pls 🥲
I wonder if the client reports changing packs
hmmm, doesn't seem like it
if the client at least reported when the pack has changed it would be better on owners considering some games rely on a particular resource pack
Why is the .sendPacket now called b?
Mojmap mappings
in the middle of game play?
I am aware of it being done at login and join
join not being the wisest of places
since sometimes it can take more then 30 seconds to download said packs
well sure, but not everyone is running modded clients either
I know, hence I said it would be nice if the client reported if the pack was changed
this way the server could kick on the basis of the official pack not being used
sure wouldn't get everyone
I am not sure what you are trying to say in regards to what I have said
this only gets sent when the box shows up to accept or not
doesn't indicate during the middle of the gameplay if they changed out the pack is what I am saying
a status of such sent from the client would just be handy for that
I am aware, I guess you are just missing the fact that I am just saying it would be nice if Mojang added it lmao
probably already has been suggested
I am just waiting for Microsoft to stop developing the Java version and then the community can really take control of it and do things that Mojang or Microsoft refused to do
probably won't be much longer, as long as the DRM AKA login stuff is left alone it will be fine to do such things 🙂
isnt that bad
the client is still rendering stuff and you're sending stuff to it
idk just a guess
client isn't trying to render anything on login
and ur not sure if the user is banned or allowed in
it goes prelogin, login, join
but on the prelogin or login the client isn't trying to render anything and that is where you should be doing your ban check and resource pack sending
because those two events allow you to make the client wait for far longer if it is necessary or if the client needs time
the join part is where the client starts to try to render stuff and where time out limits decrease
the time out limit decreases because there is a packet the server and client need to send/respond to, but in the prelogin and login phases this packet isn't part of that so therefore it is the socket timeout you can wait up to
o
TCP socket timeout by default is 15 minutes
you can if you want increase this either from modifying the code or the OS settings
generally better to do it from the code this way you don't affect all applications like what would happen if done from the OS settings 😛
second, why are you doing maven clean every time?
you shouldn't really need to do that
i can't export my server jar
again, some logs would be handy
we can't go based off what you are saying because you haven't presented a specific problem we can work at. There is like few hundred reasons why it isn't working
but if you use the link above to paste a log
we could narrow down what exactly is going on
well that is an easy problem
you don't have maven installed
install maven using your OS package repo or use this link to install manually https://maven.apache.org/
Maven isn't dependent on Java
the shell they are using is saying maven can't be found
i use java 17
usually an indicator of not installed or it isn't on the path
however you don't necessarily need maven on the path, you could invoke the binary directly if you use the full path
but currently the issue of invoking maven needs to be resolved first for whatever they are trying to do. Either they need to install it or add it to the path if it is already installed. Or invoke directly if adding to path isn't working and also installed.
is there a way to get the new item slot in the InventoryDragItemEvent without iterating over the inventory and searching for the item?
getSlots?
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/inventory/InventoryDragEvent.html#getInventorySlots()
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/inventory/InventoryDragEvent.html#getRawSlots()
declaration: package: org.bukkit.event.inventory, class: InventoryDragEvent
Dragging is multiple slots so you can do with that what you will
If you want where the dragging stopped, that's not really exposed
I don't think Minecraft really cares where it stops
declaration: package: org.bukkit.event.inventory, class: InventoryDragEvent
wouldn't that work?
if you wanted to know where it stopped XD
well the drag can't stop if the click wasn't released
unless the client is just weird like it usually is
Thanks
how can I make proper rotation system
for placing blocks
like the chest
or uh pumpkins
is it possible to create a custom event
yes
?customevent
?event
?cusevent
?cursedevent
@hasty prawn nooo this is not the day 😦
?eventcustom

?eventapi
noooooo
Hi guys! I'm making an animation using armorstands and spectator mode, is there any way to get an event when the player quits spectating the armor stand so i can cancel it and make it stay inside the armor stand as long as the animation goes on?
is it possible to stop flowers from popping off when on the wrong block? does BlockPhysicsEvent trigger if that happens
It probably does, that's a tryitandsee moment
Do they stop spectating by crouching
yes
Actually nvm, I don't think there's a stop spectating event so I would just check every few ticks if they're still spectating and if they aren't then make them spectate again
thx
getSpectatorTarget
ok! perfect
?eventapi
ty
?help
selfrole Add or remove a selfrole from yourself.
cleanup Base command for deleting messages.
embedset Commands for toggling embeds on or off.
info Shows info about CafeBabe.
licenseinfo Get info about Red's licenses.
mydata Commands which interact with the data CafeBabe has about...
set Commands for changing CafeBabe's settings.
uptime Shows CafeBabe's uptime.
findcog Find which cog a command comes from.
names Show previous names and nicknames of a member.
userinfo Show information about a member.
listcases List cases for the specified member.
reason Specify a reason for a modlog case.
permissions Command permission management tools.
?mydata
Syntax: ?mydata
More information can be found in the End User Data Documentation.
3rdparty View the End User Data statements of each 3rd-party mo...
forgetme Have CafeBabe forget what it knows about you.
getmydata [Coming Soon] Get what data CafeBabe has about you.
whatdata Find out what type of data CafeBabe stores and why.
?uptime
Been up for: 27 days, 16 hours, 48 minutes, 38 seconds (since <t:1641595966:f>)
?mydata 3rdparty
I need to be able to attach files (try in DMs?).
hm
This bot stores some data about users as necessary to function. This is mostly the ID your user is assigned by Discord, linked to a handful of things depending on what you interact with in the bot. There are a few commands which store it to keep track of who created something. (such as playlists) For full details about this as well as more in depth details of what is stored and why, see https://docs.discord.red/en/stable/red_core_data_statement.html.
Additionally, 3rd party addons loaded by the bot's owner may or may not store additional things. You can use ?mydata 3rdparty to view the statements provided by each 3rd-party addition.
Hi guys again! I was trying to remove an EntityPlayer but i don't know what enum to use, as they are all called with letters
Yes
Hi all, im making a double jump and the way I handle is when the player hurt event from fall damage happens it will remove the playername from array so it can be used again, however sometimes the player hurt event does not execute depending on the players position when they finished double jumping they would only jump a couple of blocks so they would not get hurt. How do i efficiently remove double jump? I was thinking async waiting after they jump three seconds then remove their name so they can double jump again?
Thanks
do you know player.isOnGround ?
there is very little you can do in regards to the quit event and a lot of the data part of the player object is gone. So you are limited in terms in what you able to use it for, instead you should cast it to OfflinePlayer instead if there is stuff you need from it.
No? what do you mean. i just said event doesnt fire always, you want me to check it after a couple seconds ?
tf you mean lol
you can check if the play is back on the ground with player-isOnGround
you are trying to do things with a player object that is otherwise going to be null hence why vanishdata is null
idk how to do that
no it doesnt matter
i fixed it
well if its fixed, then its fixed I suppose. Don't mind me then
do i check after a few sec?
Is there a way to convert ChatColor.COLOUR to "&x"
depends... if you allow them to use double jump via flying is enabled you need to check it many times ... also buggy to use flying for this... most servers swapped to jump + sneak instead of double jumping
ChatColour.SOMETHING adds the § symbol interally iirc
.toString() ?
Does #getChar() get 6 from gold for example
Hi guys how can i remove an entityplayer from the tab list?
another var in PacketPlayOutPlayerInfo.EnumPlayerInfoAction ...
there are 3 or 4 (a,b,c,d maybe?)
one of them is:
removing;
adding;
update-gamemode;
and update-ping
so i only have to try?
what version ?
1.17
gimme a sec
okay
Uh! ty, what is that?
a webpage
is it open source?

?mydata forgotme
Syntax: ?mydata
More information can be found in the End User Data Documentation.
3rdparty View the End User Data statements of each 3rd-party mo...
forgetme Have CafeBabe forget what it knows about you.
getmydata [Coming Soon] Get what data CafeBabe has about you.
whatdata Find out what type of data CafeBabe stores and why.
?mydata getmydata
This command doesn't do anything yet, but we're working on adding support for this.
nice
https://timcloud.ddns.net/mapping/
you need to wait for the page to load completly ... and then you can use top left search bar for class names and get an extra page (that you can save for later use) or scroll all the way down those 5000 classes
?mydata SELECT * FROM USERS WHERE 1 = 1 lol
Syntax: ?mydata
More information can be found in the End User Data Documentation.
3rdparty View the End User Data statements of each 3rd-party mo...
forgetme Have CafeBabe forget what it knows about you.
getmydata [Coming Soon] Get what data CafeBabe has about you.
whatdata Find out what type of data CafeBabe stores and why.
kekw
What could be the cause of this?
Whenever a letter with an accent is saved to config it (è) it comes back as this weird character shown in the picture. As you can see in the second picture, the accent saves completely fine to the config, it's just that for whatever reason whenever it tries to read this value from the configuration file, it messes up.
?mydata whatdata
This bot stores some data about users as necessary to function. This is mostly the ID your user is assigned by Discord, linked to a handful of things depending on what you interact with in the bot. There are a few commands which store it to keep track of who created something. (such as playlists) For full details about this as well as more in depth details of what is stored and why, see https://docs.discord.red/en/stable/red_core_data_statement.html.
Additionally, 3rd party addons loaded by the bot's owner may or may not store additional things. You can use ?mydata 3rdparty to view the statements provided by each 3rd-party addition.
uff ... what did i start here O.o
storing the id for the user that doesnt makes sense
? what do you mean
tysm
you can get the discord id by code like Player#getUniqueId does
Caused by: java.lang.ClassCastException: class org.bukkit.event.player.PlayerMoveEvent cannot be cast to class org.bukkit.entity.Player (org.bukkit.event.player.PlayerMoveEvent and org.bukkit.entity.Player are in unnamed module of loader 'app')
uff
val p = e as Player
if (p.isOnGround) {
dont use "val p" if you not know what those stuff does
???
also an Event cant be an Player
the Event can have a player involved or just an entity
to get the Player/Entity from an Event you can use
event.getPlayer()
or
event.getEntity()
some events provide more then 1 entity getter (EntityDamageByEntityEvent)
event.getEntity will return the Entity which got dammaged
and event.getDamager returns the Entity which did that dmg
kotlin 😳
also kotlin for the start might be more difficulty then just a normal proj with maven
Ty
?learnjava
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
?learnjava
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
why... would you even try to cast the event to player?
No
I fixed it
You dont get it
No I don't.
any idea how one might try to cancel the initial block breaking animation from going through, like when you give a player mining fatigue upon hitting a block it still has a tiny delay where on their screen the block appears more broken than it should be, would sending my own block breaking packets override that?
Can someone help me pls
I'm using TextComponent from net/md_5/chat/TextComponent
I clearly imported it. It's in my project files but it's still throwing me this
Caused by: java.lang.NoClassDefFoundError: net/md_5/bungee/api/chat/TextComponent at de.louidev.louicity.houses.SellhouseCommand.onCommand(SellhouseCommand.java:30) ~[?:?] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[bukkit-1.18.1-R0.1-SNAPSHOT.jar:?] ... 21 more Caused by: java.lang.ClassNotFoundException: net.md_5.bungee.api.chat.TextComponent at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:147) ~[bukkit-1.18.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:99) ~[bukkit-1.18.1-R0.1-SNAPSHOT.jar:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?] at de.louidev.louicity.houses.SellhouseCommand.onCommand(SellhouseCommand.java:30) ~[?:?] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[bukkit-1.18.1-R0.1-SNAPSHOT.jar:?] ... 21 more
Your running bukkit instead of spigot @winged spindle
that's really it? i just have to use spigot and not bukkit
?
Yep
You shouldn't be using bukkit in the first place btw
k
Do I need to use NBT API again or is there a new spigot api method since 1.8 for nbt tags
should i use strings as primary key in a database, im trying to store kingdoms and they cant have the same name
The client controls whether isOnGround is true iirc, that's why it's deprecated.
what the hell
Meaning it can be falsified by a hacked client
Yes, if that's what needs to be unique.
ok but why got i four databases now
It's just being thorough!
?paste
Hey! I got a problem when using a Kotlin plugin compiled w/ ShadowJar.
When importing it from another plugin I can use it's classes properly and the new plugin compiles, but the IDE does not detect the import correctly and everything is red, even though it compiles. Any idea?
I thought it could be the ShadowJar compilation, but checked other projects and they are not doing anything special
its kinda weird that you cant call a static field in an enum initializor however you can use a static method
which just returns the field ;/
Would Team.addEntry() work with UUID instead of the players name?
?tryandsee
has anyone here worked with mushroom blocks as a custom block before?
I am trying to give the player a mining fatigue effect upon the onBlockDamageEvent but if you use any high level axe the block breaks before the event is even passed so they still get the effect but the block is already gone
Cancel the break event
would that look funky in game with the block reappearing?
ill run it if its the best option
the block will reappear
Kinda, but there's not really another option unfortunately
yeah ive browsed online and havent been able to see a better option
Or use a different block I suppose
Note blocks and Glazed Terracotta are decent options
I would use noteblocks but I dont want to take such a large block out of the game
How many blockstates are on glazed terracotta?
I think im just gonna have to stick with mushroom and accept that its going to look a little funky
Which states of mushroom blocks are you using? Aren't they all technically obtainable on survival by placing blocks in the right places
Yes
Thought so
yeah but im cancelling the ability to change blockstate and going to replace natural mushrooms with only full sided versions
I was pretty proud of it until i found out axes annhilate my entire system
Yeah... You could try giving them mining fatigue if they look at a mushroom block with an axe I suppose
I thought about that but wasn't sure how optimised that may be
Then pray it affects them before they click
I would just try both and see which you like more
yeah yeah
would it be a good idea to save all the members of a kingdom in a collection the kingdom class and the kingdom the user belongs to in the user class or just on one place?
i assume that looping over all the members of a kingdom is easier than looping over all the users and determining whether or not that user is in that kingdom
You have errors. Trace files are error logs
ah and the other one? (second one)
Prolly did something strange
yea :C
how to remove all bossbars
wont this work?
Any ideas why the message doesnt appear and the function doesnt run?
The event works as the enchantmenu stuff below works
I just added another message and it 100% is running
e.getWhoClicked().sendMessage("EVENT");
if (e.getAction() == InventoryAction.SWAP_WITH_CURSOR) {
e.getWhoClicked().sendMessage("SWAP WITH CURSOR");
applyEnchantBook((Player) e.getWhoClicked(), e.getCursor(), e.getCurrentItem());
}
Tried if (e.getAction().equals(InventoryAction.SWAP_WITH_CURSOR)) { also doesnt work
immutability moment
what enum constants
ah i mean this
:C
void
I just changed it a bit
and changed the action thing to
if (e.getCursor() != null && e.getCurrentItem() != null) {
if (e.getCursor().getType() == Material.ENCHANTED_BOOK) {
applyEnchantBook((Player) e.getWhoClicked(), e.getCursor(), e.getCurrentItem());
}
}
And its at least running now
The e.getAction() == InventoryAction.SWAP_WITH_CURSOR wasnt working
It wasnt true when I was swapping items
I just used a different less performant method
Did you register the event
i registered the class yes
Is it annotated
Bukkit.getServer().pluginManager.registerEvents(inventoryCore() as Listener, this as Plugin)
So what?
Lmao
Okay now my remove book isnt working
player.getInventory().remove(book); does not remove the book
use an extension function there
How can I remove the cursor item then
🙂
is a double in java a DOUBLE in sql? i guess yea
Thats what book is
Like you say its not in inventory
apparently player.setItemOnCursor(null); works
how can i remove the empty bottle when someone drink a potion
kk
Whats the Equivalent to NBTTagCompount in 1.18.1
You’ll have to check both hands
Thats cursed
wow
Is there something like hasKey() in 1.18.1 on NBT
0.5 attack is a good rate, I guess. 😆
anyhow, you need to pass ur plugin instance, cant cast this to Plugin whenever you want
I tried to replace the sword with the updated one with
e.getRawSlot()
player.getInventory().setItem(itemSlot, item); // update the item
heh does anyone knows if a float in java is FLOAT or BIGINT in mysql?
this doesnt work
and shouldnt have to do it with your inventoryCore also assuming its a class which extends Listener
Float since its a float not a big integer?
my ide is telling me to create a class when I want to use
PacketPlayOutAnimation()
Why? What to import so i can use
ty
I read somewhere that SWAP_WITH_CURSOR doesnt work in creative
will that work?
Is there something like hasKey() in 1.18.1 on NBT
i'm asking
check the mappings
i dont knwo
ok
I didn't find anything, thats why I'm asking to make sure I didn't miss anything
.
whats that site?
how can i disable player collision on a 1.18.1 server?
all i searched on the internet does not work
player.setItemOnCursor(null); also didnt work in creative
player.getInventory().setItem(itemSlot, item); // update the item for some reason puts the item in my hand?
No one can help you if you just mention the error
?paste
paste what
the error
Look
Unresolved reference: minecraft
cant find it
need import for PacketPlayOutAnimation()
If I would use packets to set the player's displayname on the tab, and on their visible name (aka nametag), would I be able to make per-player scoreboards?
I mean, if I just simply use the team feature, the per-player scoreboard just dies
How can I reobfuscate the NMS dependencies when I do a Mvn package
Because I can't use the mojang-remapped ones
i added spigot . jar as a library?
added spigot jar
im not exactly sure what the problem is, i dont use kotlin
dude its not a kotlin issue
i cannot import net.minecraft
im using Intellij
1.8.8 cringe
You are cringe 😬
😬
lmao
Hope you don't need anymore help 😄
^^
He was not the one that was helping me
Just making unnecessary comments
No one cares.
Doesn't really matter, you're not showing that you're going to be someone fun to help by saying stuff like that.
Using a supported software is always a better practice
^
You also are just really rude with people trying to help, you give like tiny bits of information and then when we try to figure stuff out u just give us attitude
1.8 ftw
Time to use 1.9
will stay at 1.5.2 but thanks
I have been using 1.8.8 R3 since March-April 2019 and never had problems
I also used 1.8.9 a lot
Didn't had too many problems
yep
newer versions are just more convenient ig
no just no
yes just yes
So you like sitting on trashy legacy api anf fucking with internals i guess
How can I get WorldBorder getcenter()?
Ill just do hideEntity when you'd have to send and listen to packets
The API of 1.9+ is more annoying to me
Ill just use pdc when you'd have to mess with nbt
how?
its almost identical to 1.8
not many major changes
How can you hate more features and bug fixes 
but pvp!!!!!!!
Are you talking about 1.8?
I like both pvps
1.9+ pvp is discusting
Tbh, i'd even say 1.9 is better than 1.8
yeah
thats entirely subjective tho, and that does in fact not justify why you would like the api for 1.8 more
I prefer 1.8 but being realistic 1.9 is more acurrated
Is like going to WW1 and start making people fly
1.8.8 is the most popular version ever
by punching them
for servers
most support easy to use and also the highest amount of ppl playing mc are 1.8 easily put in viaversion and boom u can have a server with all version supported since 1.8
can you provide statistics supporting your assertion?
^^
can you proof that its not
I can prove that it isn't! :D
where is that from?
ty <3
thats litterly the first thing I disable lol
I have no problems with version
all 1.8 servers disable bstats
I really don't understand you guys
this
It makes no sense
hypixel uses 1.8
proof?
no
mineplex uses 1.8
💀
Do they really Conclure? 
but its whole different story when you maintain your own software
Dessie, they used to at least
for some of their servers
thats pretty funny
wth is yatopia and catserver
Surely they've updated considering 1.7 isn't supported on them anymore
Pretty sure, Hypixel uses 1.8 because of their gigantic legacy codebase. You have a great chanve to keep everything updated
wait what
this guy really crying over someone who uses 1.8
its really not that bad
we aren't saying it's bad
Too old! (Click the link to get the exact time)
No one is crying, we're just telling you that it's not the best idea.
who made this 😂
I will not stop bullying you
anyways stating that just 1.8 server owners are merely the ones who turn off bstats is bullshit
^
Noppe
the time flies wtf
look at the page source, it has the author at the top
I feel old with 16y xd
I understand why people use 1.8, but the api is objectively worse
No?
I guess for a pvp server like Hypixel, 1.8 is still a great idea. Ofc for a modern project 1.18 is highly better.
bruh i can easily update to latest version, im making my plugin and i tried out 1.18 no problems
Ofc yes, you should have solid reasoning behind supporting 1.8.8. If you're using it just for the hell of it you're doing something wrong
yes because there is an api to begin with lol
1.8 server owners when they have to use an outdated plugin to get it to work
its pretty funny that you can emulate pvp (w/o bh tho) and kb completely on any version but 1.8 to match 1.8
Ikr
all things considered, 1.8 users substantially neglect it sadly
All 1.9+ features/bug fixes, or block hitting... very difficult decision really.
yeah, what a true dilemma
hypixel maintains their own fork, just because they use 1.8 doesn't mean everyone else should. The difference between random pleebs using 1.8 and hypixel is the fact hypixel isn't coming here to complain that something isn't working.
Everytime i came here, it was not because of 1.8 wasnt working. there are no issues for me
well they are not the majority so that is fine, but you can't use outdated software and then also want to complain when something isn't working
Oh I'm sure they want to, they just can't.
but you came for that
No. I came here because i wanted to import net.minecraft
that has nothing to do with a version.
What even was the issue
Importing net.minecraft to use packets for animations.
Anyways breh I’m enthusiastic towards that you use kotlin 
No I know but what was wrong
No we don’t lmao, we use 1.8
I just couldnt import it Cuz i didnt know how to but then i figured it out 😄
Ah
NMS does have to do with a specific version because between each version dictates how it must be done and which kind of reflection you may or may not need
Im sorry for your loss
for all servers except the smps (and proxies but ye)?
im pretty sure Packet animations are similar
packetplayoutanimation
between each version? Depends which versions you want to compare because packets are based on the protocol
It’s a fork so if I want a new api I just make it
sometimes the protocol between one version to another can be similar while other times significantly different
Exactly, sounds like too much effort. 
We don’t have anything running 1.7 and haven’t for like 6 years
oh nvm me then, fair
not that using 1.7 as a base would be any differently really XD
It’s actually pretty nice, I have some nice events spigot still doesn’t have iirc
but it makes more sense to use 1.8 due to the whole UUID thing 😛
Would’ve made my viaversion fork a bigger pain 😂
I should say 1.8 makes an easier base to fork from
Like?
Off the top of my head (not sure if spigot still doesn’t have this to be fair), I have a way to get all the drops from when a player breaks a block, and modify or clear it or anything else on the event
i got mineplex source code (1.6.4) from 2014 😂
Yeah for sure, and any 1.7 functionality is easy to bring back
I believe we have the 1.7 hunger rate
well what I was getting at with 1.7 was the fact that you would need to upgrade the protocol anyways
since UUID's came into play officially in 1.8
Yeah 1.7->1.8 was a total pain
Lol
We used to maintain a nightmare spigot fork with all of the different versions supported
Probably the old message
But that was a crazy hassle
I think that is probably accurately named
import mineplex.core.common.util.Callback;
import mineplex.core.common.util.FileUtil;
import mineplex.core.common.util.MapUtil;
import nautilus.minecraft.core.utils.ZipUtil;
import net.minecraft.server.v1_6_R3.ChunkPreLoadEvent;
😂
Hypixel probably does still use 1.7 in places
wouldn't surprise me
but it would be nice if people stopped comparing hypixel or mineplex as a valid reason to continue using 1.8 or even 1.7
when both places are running their own forks which isn't quite the same thing
bro most successful mc servers support 1.8 - latest
by now, you could probably say they have their own implementations where you couldn't tell it was spigot or some other base fork
In all fairness I don’t have an issue with someone continuing to support 1.8, there are still servers running it and players playing it
I definitely wouldn’t go that far lol
There's nothing inherently wrong with supporting 1.8, you just shouldn't unless you really have to
well if I do anything in relation to outdated software it wouldn't be to support the players
it would be more because certain versions are easier to work from in terms of backend
I would only support them for a larger audience
Very dependent on your target market and the needs in that market
Yes
for instance if you wanted a more optimal bungee mc server where everyone goes to first, 1.8 makes a lot more sense code wise to use because it already has a lot of things cut out, just need to implement updated protocol of whatever you are making use of instead of not using 😛
Someone just needs to make a 1.8 Animations mods for latest, then maybe we wouldn't have to deal with this anymore 
lol
if that is all its going to take to have more people move to latest
then I should seek out this mod
and update it XD
We have OrangeMarshall's 1.7 animations mod for Forge, only works for 1.8 though :(
So that helps us exactly not at all
but yeah you could say my biggest gripe in terms of people using outdated software is people keep expecting to get some kind of support for it instead of just understanding for the most part you are on your own
and if there is some kind of bug, yeah it is not going to get patched XD
exceptions being I guess security related
Should've only fixed the log4j issue in 1.18 and used that as a reason to get people to update
wouldn't have bothered me
some people wouldn't like that but again goes back to if you are going to use outdated software then you accept all risks that come with it
all being literally anything and everything XD
exactly 
yes
what should i replace is with
pass the plugin in constructor
what
commandManager.java
in commandManager, pass the plugin in constructor.
https://www.w3schools.com/java/java_constructors.asp
so you do new CommandManager(plugin)
in where? main file?
I’m looking at kody Simpsons spigot plug-in tutorials, would they still be useful?
They were posted 8 months ago
you think playermoveevent would be best for that?
That or checking every few ticks
this isn't inherently bad, however you should use Dependency Injection. But if your plugin isn't something that is designed to be depended on or you are not going to provide an API then really it doesn't make too much of a difference between getting the main class instance using a static or via constructor.
I would rather not test every few ticks unless it was like every two or three because it could occur after the player clicks and do nothing
highly unlikely but possible
There's service manager, so singletones are not necessary even if plugin meant to be depent on
doesn't make much sense to use service manager to obtain the main class instance of your own plugin
ehh
using a static for this isn't inherently bad mainly because the main class isn't going to magically disappear XD
main class is global anyways
why so
what do you mean why so, name a plugin where you can't obtain its main class from another plugin?
Its a regular entry like any other object
main class of plugins are global anyways, therefore using a static for your main class reference really doesn't make all that much of a difference
the difference however is you shouldn't use the static reference for outside things to get the reference and instead should use DI for such things, but internally doesn't really matter much except in terms of design principles or if the class is designed to be used by other things other then your own plugin. Which case DI is the way to go. Also singletons are not in themselves bad either because sometimes a class needs to ensure that there is only ever one instance of it.
That sounds pointless
Why woukd you ever had a class thst should keep only a single instance? That kills reusability
JavaPlugin#getPlugin
The main plugin class will only ever have 1 instance
In general, there are plenty of valid use cases for a singleton pattern
for example?
i mean the main plugin class could be a singleton but id argue its better if you use DI