#help-development
1 messages · Page 1843 of 1
Mojang would already have done it
EULA is only applicable to java servers am I right
what? not quite sure what you mean here?
Yes thats why I said plain vanilla
Bedrock and PC version are both created by Mojang o.O
Yes I know
Then not entirely sure how the EULA prevents them being compatible with each other
Sure, but do any of the rules from bedrock conflict with the pc version?
Multiplayer side yes
which rule specifically?
I mean PC version EULA doesn't really require much of anything
therefore, I don't see what the EULA in the bedrock would have that would conflict with the PC verison?
Owners of bedrock servers may require payments from players. Which would conflict with java. And vice versa. Java players would be at a disadvantage compared to bedrock players
Java servers can require payments too
EULA does not prevent that
what I mean is, a server owner can charge money for you to enter said server
so as long as it equally applies to everyone
so my point about the two EULA's is that the PC version isn't very restrictive
where as the bedrock one might be
which is ok, because as long as both are not super restrictive then its easier to comply with both 🙂
Bedrock sucks
It’s only a matter of time for Greedysoft to implement some form of in game currency for Java
Thats why i call bedrock Microsoft Minecraft
There is already one in it lol
DLC Minecraft
Want superflat world? DLC
Biomes? DLC
Villager skins? DLC
Bonus chest? DLC
Jeb the chad: works on java
Microsoft: copy his work in cpp and put every single item unlockable via micro transaction
won't happen
not sure how it would work in Java
without it being circumvented?
just because it is in the game, doesn't mean you can't remove it from the game. Mojang doesn't run the servers except for realms which is where most of their EULA applies XD
Curseforge bought by microsoft and implemented in the game client.
Would be funny
its like saying you can't accept crypto as payment because we said so, even if the local government allows it
if Mojang controlled all the servers that are running it would be a different story
but unfortunately nothing says you can't remove something from the game XD
Frl it would be a good idea by Microsoft to buy forge
Microsoft has been pretty hands off when it comes to the Java Edition. Really glad they haven’t destroyed it, but I am of the belief that they will make a move eventually.
they can't really destroy it is the thing
literally the community controls the Java edition
Thats why they do their own pc version
if they do something the community doesn't like the community will just continue with their own versions
like it is now
The java community is conservative
And the bedrock one is more open to change
Idk
also, keep in mind that while Mojang can change the EULA, EULA changes are not retroactive
The bedrock edition is managed more tightly. It’s not that they are open to change, but they are being forced to change.
Massive paradigm difference between the editions.
so because the EULA changes are not retroactive, this is what allows the Java edition players to continue on if they don't like something 😛
Not really
Java community has been very welcoming of major changes through the updates
But the java edition always had the freedom and flexibility
yep
Bedrock edition didn't
Trying to remove flexibility from something will generate more backlash than releasing a new thing with less flexibility
Import the bedrock marketplace into java i dont think it will be well appreciated
or doable
Everything has been free since the beginning
have to keep in mind Java as a language was never designed to be difficult to reverse engineer or anything
Bedrock is real bad compared to java
this is mainly what allowed projects like bukkit and spigot to exist to allow plugins for minecraft servers
I don’t necessarily think it would be that bad*
I really like the bedrock cosmetics system. I dislike the micro transactions, but if they approached it a little differently, I’d be ok with it.
Same
I would be fine if Mojang charged a small license fee for servers
if they did this, they could just allow the server owners to do just about what they want. And we could have a marketplace where people can sell their stuff
If it can incite people into creating content
Its good
And by creating content, you can download other content because of the reward system
the main reason for their microtransactions is for revenue, a monthly server fee which can be paid yearly would solve this as long as it is reasonably priced for that fee. Like maybe $10 or something
We have this, it’s just fragmented across many sites. If there was a centralized place, it would likely suffer the same fate as Bedrock as whoever controls it makes the rules.
I didn't mean for the plugins, I mean they could make the java version where cosmetic stuff can be created and sold
Make it opensource 🤷🏼
Minecraft code is partially open sourced already
just not directly
the other portions of the code, the community has already reversed engineered
so I mean, its not like there is something in the Java verison that is unknown or hidden XD
One of the benefits of using Java as your base.
well mainly because Java wasn't intended for private use 😛
There was a reason why Sun didn't care about people using their language for free without paying for it. Their goal was aimed at enterprise and didn't care what people did with it privately
the penalties for businesses stealing or breaking licenses is a lot higher then for an individual
I wonder if notch wouldve chosen java over cpp if he knew the game was gonna be that big
also easier to enforce licenses on businesses then individuals
he chose java because that is what he knew at the time
everyone agrees the server shouldn't be in java, but unfortunately java is also perfect because java is what allowed the server to be easily modded or projects like spigot to exist to allow plugins
in other words it is the communities that allow customizations that made Minecraft popular and not MC itself
cpp kinda sucks
People can complain all they want but I really like java and much prefer it over c++
It's better for modding as well
I agree java is an easier language to work with for those new into modding/plugins etc
Not really what I mean
Its OOP is much better and it's just overall a much safer and more robust language if you ask me
The only thing C++ has over Java is the speed. You can get damn near close with Java, but you kind of have to know a lot.
C++ is all over the place in terms of its standard library
Yeah java is not nearly as slow as most people think it is
or run a Java OS 😛
Granted it's still not as fast as C++ but with the runtime optimizations it can be really damn fast still
What a vague question
this is the spigot server.....
Use maven/gradle to import the dependency
I like how md_5 comes back to respond specifically to that lol
anyways, Java if you code appropriately can be quite fast/efficient just depends what you are trying to do with it, but this generally applies to all languages lol
I think it mostly about the habbit
If there was an API for C++, I would probably use it instead of Java, just because I'm more familiar with it
Good night yall gotta sleep its christmas eve tomorrow
what do you mean? like a minecraft api but in c++?
if so there was one created already, not sure if it is still maintained however
I’m pretty sure I’ve seen some projects that exist for that purpose. Granted it’s been a while, but I remember someone talking about a similar idea.
also you can technically use C++ with java as well
cya later
Because in Java I'm really not that comfortable with all this automatic memory management, and I prefer to have some kind of control over object lifecycle, but I believe it's only because I learned this way first
If for example I started coding with Java or C#, I would think the opposite way
ah I see, well I mean you can tailor the JVM quite a bit. And there is some techniques you can use code wise to help ensure efficient memory management as well
like for instance, you can null out objects to ensure they get GC'ed
or null them out if you know you don't need them anymore thus when re-created you don't get some old instance instead
or object re-use
instead of creating and destroying thousands of objects that are the same XD
Ah, thanks for explaining, but it wasn't exactly the point. Yall were arguing what language is better, but I believe it all comes to what experience with programming you had first, it is just more familiar to you, so it feels more "correct"
well the reason I would have preferred MC to be in cpp is because you have much more control or easier access to hardware level stuff if need be
I am pretty sure everyone agrees that MC being in Java was probably the best thing because it is what helped it become popular
because Java is easy to work with
It’s also real easy to get installed on almost every platform.
More like, it's much more easier to decompile and modify as you wish
one of the hardest things with cpp is memory management
Just wait for Valhalla to drop and we can finally get some sick speed
other then understanding how pointers work
I think that's the reason bedrock servers aren't that popular, because it's probably an absolute nightmare to modify them to the same extend Java servers are
since the majority of people doing anything with MC is kids, java works out well
Java also has a lot of safeguards for newbies. You can really do some damage with C++ if you aren’t careful.
they have their own packs thing and is more like scripting, but yes if you wanted your own bedrock server good luck because you are really not going to decompile the native version and really just have the protocol to work with and the idea of how something works in the bedrock edition
so there is a lot more work or effort that needs to be put into it to create something like what spigot provides
especially when updates come along XD
yep totally agree with this
Side rant: One of the biggest things that irks me about Bedrock is that it’s not supported on Linux. I understand why Dungeons isn’t available since it relies on Xbox services, but the whole point of the Bedrock Engine was and still is compatibility between platforms.
It runs on Android ffs, sure the Android kernel has been forked and modified significantly, but that’s still a solid start. It’s not like they couldn’t have done it.
Then Microsoft had to go and really fuck it up by converting the launcher to a windows app. No one really used or adopted the Windows Universal Platform because it lacked features and couldn’t replicate the functionality of a native application. So why did they go and do it anyways?
Yea I know that you can get it working, but I meant direct support from the launcher itself.
I would just prefer it launch from the official one rather than installing yet another launcher to play what could already exist if they just put the effort in.
well you also have to consider MS doesn't like linux 😛
Yeaaaa
bedrock was intended to be for everything else while pc verison for desktop when Mojang created bedrock
they dont even support it on mac os despite selling mac os builds as education edition
thats something to get more annoyed about imo
I could be thinking of the Java edition, but back when I had a Mac, I thought I was using the bedrock edition. It was the early days of bedrock, but it’s not on Mac as of today?
Did they just only develop for Windows and consoles? Cause that just goes against the message they were constantly advertising about cross platform.
Öh, true, I was annoyed by that too
originally bedrock was for everything else because it was easier, during the middle of bedrock(there was technically multiple versions depending on platform lol) mojang was sold, and then MS consolidated all the bedrock versions into a single one. and then I guess mac and linux got left out of the bedrock verison, but then again not entirely sure if it was ever intended to include those OS's since the Java edition pretty much covers that. The only reason windows 10 has bedrock is due to the windows store apps.
Also, it's not even fully on windows
I'm on windows 8.1, and there's no bedrock either
You aren’t able to get it through the Microsoft Store?
isnt windows 8.1 eol or close to it by now
well it was specifically released for windows 10 lol
Oh shit, that’s right. It’s literally titled Minecraft: Windows 10 Edition, I forgot about that.
Maybe it is, but i'm too busy to update
Yep and if you were around for that you were able to get a free copy if you had the pc version 🙂
had a limited time to claim your free copy
Which I do have the windows 10 edition 😛
You probably want to get an ISO of Windows 10 as your PC might not be able to run Windows 11
I just never play it, claimed it because it was free for me so why not XD
Yea I also got it for free, since I owned the Java edition. Glad they didn’t make me pay for it again. 😛
I even own the PS4 version as well
played that a little bit, but didn't really like it
and then also own it on Android but my younger brother plays it there and I don't
didn't really like the controls
It is able, but if I decide to update, I'll probably go for Windows 10
@sullen marlin The Bedrock engine runs on iPhone right? Didn’t Apple have an update for Mac that allows for running apps on your desktop? Or at least tighter integration between MacOS and iPadOS. Meaning you might be able to launch Bedrock Minecraft on MacOS. Or am I thinking of that Windows announcement for Android apps working on the OS?
Smart play. Windows 10 is supported until 2025 so by then, Windows 11 should be stable.
Also, hopefully by 2025 I'll have a new PC
Hopefully by 2025 graphics cards won’t be scalped into oblivion.

if your computer was manufactured no earlier then 2016 odds are you can run windows 11
because that isn't the official place to get it
use buildtools to obtain the api
buildtools is available from spigot
it is the official way of obtaining spigot and its api
?bt
oh you need the api, forgot you can just download the api from the repo
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
on an i3770k it takes around 2-3 minutes to build with BuildTools
Can someone help with this: https://www.spigotmc.org/threads/quaternion-for-roll-yaw-and-pitch.539184/ ?
What are FrontXYZ, LeftXYZ and UpXYZ?
From teh video it doesn't look like you will need quaternions as you never loop
Hey how do I use Event Damage Cause, I am trying to make a "if event damage cause = "entity_attack""
Isnt there already one
Ah
Its a highlight
if(EntityDamageEvent.DamageCause() == EventCause){
}```
EventCause is a string
then a method call is expected
yea you cant use it like this
Ah
you also cannot compare a damagecause to a string
are you trying to do this inside the EntityDamageEvent?
EntityDamageEntityEvent yes
@EventHandler
public void damageevent(EntityDamageByEntityEvent e)
{
if (e.getCause() == EntityDamageEvent.DamageCause.ENTITY_ATTACK)
{
//code
}
}
example usage
OH that makes so much more sense
great
Thank you EpicGodMC
👍
what event function is used for right-clicking a block?
so i would use playerInteractEvent()?
yup
and how would i check for a right click?
how do i get PlayerInteractEvent.action?
public void playerInteractEvent(final PlayerInteractEvent e)
np
another question is how do i make it not show the default '&e%default joined' message?
and '&e%default left'
Could manipulate PlayerJoinEvent and PlayerQuitEvent
Set to null to disable
declaration: package: org.bukkit.event.player, class: PlayerInteractEvent
yea that should be good
you can go and check in mc if you want
@delicate cargo
That are the positions where you can calculate the rotations. The video are only the PosXYZ
getBlock?
but i need to compare it
ffs
im asking
how do i compare getClickedBlock()
with a block?
ive already SAID THAT
...
stop being mean or people will not help you bruh
what im saying
is how do i compare the damn thing?!?
(getClickedBlock() == WHAT?!?)
WHAT do i put there?
?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.
i think it is time to see some basic.
Check the type
wdym?
If event.getclixkedblock.gettype == Material.Stone for example
you are asking us the question you should ask yourself.
so i think you should do some
?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.
i think you should actually bother to read my question
no, but you should.
because you kept telling me to use ==
but you didnt say to use .getType()
and then compare with a material
most people with basic java will understand what im saying. which you arent according to what i've seen
i understand that i need to use ==
but you were no help with telling me what i should compare it with
That's your job.
i would be here all day if fourteen hadnt helped
.
anyway
the interact function
is it onPlayerInteract() or playerInteractEvent()?
Neither
which is it then?
PlayerInteractEvent
The function is whatever you want
this guy is weird
He's new, probably.
The name does not matter
doesnt it?
No.
because if im registering an event surely it must
No, you'd need to register the class.
No
what?
Don't you know how to register events?
just to clarify, im using implements Listener
You register the class if it is in a separate class, if not just use this.
That alone won’t make the event class register said methods
yeah you need to use PluginManager::registerEvents
hostile
https://www.spigotmc.org/wiki/using-the-event-api/ btw this thing goes over what you need to do
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.

i need to do an action when dropping an item with Q and another one when dropping it from the inventory(by clicking outside of it with the item on the cursor). Is there a way to do that?
Afaik dropping an item is just dropping an item, it’s not tracked whether it was by inventory or simply dropping it from hand
Tho I guess you could check whether the player has an open inventory
Altho this wouldn’t work with the player inventory as its always open
Ooo maybe that’s what he’s looking for
Yea that would make sense
I tried with this method but it seems that the drop event has an higher priority
https://paste.md-5.net/voqekuhema.cs
afaik the inventoryclickevent sets the slot to sth absurd like 999 when dropping it out of the inv
Chest thisBlock = (Chest) event.getClickedBlock().getState();
PersistentDataContainer chestData = thisBlock.getPersistentDataContainer();
Byte dataByte = chestData.get(LOOT_CHEST_KEY, PersistentDataType.BYTE);```
Intellij is saying this byte will always be null, why?
alt+enter then "Find cause"
:what:
just a sec
its not pasting
oh no image
it just sais 'dataByte was assigned'
you didnt verify
to post an image
!verify
Usage: !verify <forums username>
wait nvm maybe I found it
what is a byte when its not assigned anything?
I was checking for null
xD
Byte
like int and Integer
Integer can be null, int can't
idk
PersistentDataContainer returns that
we are not talking about you
I had a question already
You can still use byte
dont be hostile
that guy is asking what he doesnt know, which is the purpose of this channel isnt it?
oh
thought you want a help with codings
nah dont do it
just use bettergui
or trmenu
IDE
intellij or eclipse
then librabries
?learnjava when
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.
It was not meant to be hostile just clear :|
What
i think you will need at least 1024TB drive
to get every librabries in the internet
maybe even more
LOL
just
i think you should see some basic about what is coding
then go see what is java
and then start to learn java
you dont? because that question looks sus
i dont know how to coad
that name looks sus
oh i just got here in like august and already 5k messages 🥳
you could look up a series on youtube on how to make your first plugin
HOW
why doesnt this work?
@EventHandler
public void onPlayerInteract(final PlayerInteractEvent e) {
if (e.getAction().equals(Action.RIGHT_CLICK_BLOCK)) {
if (e.getClickedBlock().getType() == Material.CRAFTING_TABLE){
e.setCancelled(true);
openGui((HumanEntity)e.getPlayer());
}
}
}
gonna delete some of my old message so that people will never know how bad i was 👺
is it registered?
also compare enums with ==
ok
i mean it does cancel
and is registered
just doesnt open
public void openGui(final HumanEntity ent) {
init();
ent.openInventory(gui);
}
wtf are you doing?
you wait
here is the opengui func
public void init() {
for (int slot = 0; slot < 27; slot++) {
if (slot != slotOut && !(Arrays.asList(slotsIn).contains(slot))) {
gui.setItem(slot, Utils.createGuiItem(Material.GRAY_STAINED_GLASS_PANE, 1, ""));
}
if (slot == slotOut) {
gui.setItem(slot, Utils.createGuiItem(Material.BARRIER, 1, "&c&lINVALID RECIPE"));
}
}
}
and the init function aswell
Hello, I have a problem on my network, while programating messages of a plugin when the answer like Error, missing access or things like that the message contains rare letters, I am trying to solve this 5 days before
Like the first A
did you code the plugin?
ofc, who else is here?
well why tf are you asking about a plugin you dont develop on in the place for help with development?!?
you ask it in the plugins official server
Sorry, I think I was on #help-server
...
anyway why doesnt this work?
public void init() {
for (int slot = 0; slot < 27; slot++) {
if (slot != slotOut && !(Arrays.asList(slotsIn).contains(slot))) {
gui.setItem(slot, Utils.createGuiItem(Material.GRAY_STAINED_GLASS_PANE, 1, ""));
}
if (slot == slotOut) {
gui.setItem(slot, Utils.createGuiItem(Material.BARRIER, 1, "&c&lINVALID RECIPE"));
}
}
}
public void openGui(final HumanEntity ent) {
init();
ent.openInventory(gui);
}
and finally this as well
@EventHandler
public void onPlayerInteract(final PlayerInteractEvent e) {
if (e.getAction() == Action.RIGHT_CLICK_BLOCK) {
if (e.getClickedBlock().getType() == Material.CRAFTING_TABLE){
e.setCancelled(true);
openGui((HumanEntity)e.getPlayer());
}
}
}
```
yes it is getting cancelled
I saw someone do the custom scoreboard with a plugin and resource pack, but I dont know any more than that. Does anyone have a idea on how they do this or a tutorial I could follow?
font
custom font
I understand how to do it, but dont know how to explain it in the easiest way possible
what about the border?
everything is font
hm
maybe not the level classes but the rest mostly fonts
you have the resourcepack right?
no
ooo ok
all I have is that screenshot
all I want is something like the border and the top and bottom, not what is inside the scoreboard
welp we can do some pretty cool things with custom font
How do i use NuVotifier with maven? i've done it as a local package before but that isn't cross platform due to the slashes. https://github.com/NuVotifier/NuVotifier/wiki/Developer-Documentation#maven this can't find the version
they even use it for custom particles now lul
i just dont know how
*dont know how they could not be lazy
<dependency>
<groupId>com.github.NuVotifier</groupId>
<artifactId>NuVotifier</artifactId>
<version>2.7.2</version>
</dependency>
I'll try
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
yea, got that
k
I went to https://jitpack.io and found the actual repo
That's what i did
[WARNING] NuVotifier-2.7.2.jar, SVL-1.3.0.jar, acf-paper-0.5.0-SNAPSHOT.jar, gson-2.8.0.jar, netty-buffer-4.1.49.Final.jar, netty-codec-4.1.49.Final.jar, netty-common-4.1.49.Final.jar, netty-handler-4.1.49.Final.jar, netty-resolver-4.1.49.Final.jar, netty-transport-4.1.49.Final.jar, netty-transport-native-epoll-4.1.49.Final-linux-x86_64.jar, netty-transport-native-unix-common-4.1.49.Final.jar, nuvotifier-api-2.7.2.jar, nuvotifier-bukkit-2.7.2.jar, nuvotifier-bungeecord-2.7.2.jar, nuvotifier-common-2.7.2.jar, nuvotifier-sponge-2.7.2.jar define 1 overlapping resource:
[WARNING] - META-INF/MANIFEST.MF
- META-INF/MANIFEST.MF
SVL-1.3.0.jar, nuvotifier-bukkit-2.7.2.jar define 1 overlapping resource:
- plugin.yml
netty-buffer-4.1.49.Final.jar, netty-codec-4.1.49.Final.jar, netty-common-4.1.49.Final.jar, netty-handler-4.1.49.Final.jar, netty-resolver-4.1.49.Final.jar, netty-transport-4.1.49.Final.jar, netty-transport-native-epoll-4.1.49.Final-linux-x86_64.jar, netty-transport-native-unix-common-4.1.49.Final.jar define 1 overlapping resource:
- META-INF/io.netty.versions.properties
maven-shade-plugin has detected that some class files are
present in two or more JARs. When this happens, only one
single version of the class is copied to the uber jar.
Usually this is not harmful and you can skip these warnings,
otherwise try to manually exclude artifacts based on
mvn dependency:tree -Ddetail=true and the above output.
See http://maven.apache.org/plugins/maven-shade-plugin/
I don't think that worked
looks like it worked
there were no errors
just a warning about a overlapping file
hello?
lets see then 🙂
it said you can skip these warnings
idk then
what doesnt work
just testing it, you might be right
doesnt open the inventory
are you initializing gui?
like gui = Bukkit.createInventory("Inventory", 54);
or something like that?
Nope 😭
just realised i had set inventory to null
but there are no listeners (the code is fine)
tysm
np
so your plugin is a vote-listener?
yes
nothing
did you code this yourself?
we cant help then, this is for people who have trouble with their code. Head over to #help-server
they can prob help
error?
@tulip owl I found your issue
in your vote.java file
you have the class implement listener
https://github.com/astei/SuperbVote/blob/master/pom.xml Ooh just found this, I'll try these imports
in the ZuVotifier docs it says to implement VoteListener
@tulip owl try this ^^
public class BasicVoteListener implements VoteListener {
public void voteMade(Vote vote) {
System.out.println("Received: " + vote);
}
}
Paste the code
thing is, it works perfectly find by adding the .jar manually
?paste
he didnt make the plugin
^^
No1 is going to take the effort to decompile it
he downloaded it off the insternet
we tried to say that
oh, so then do you just want it included in your build?
Yeah
basically
hmmm
Idk how to make stuff shadow in maven
in gradle its pretty simple
Maven doesn’t allow system dependencies to be shaded (requires a plugin)
As opposed to gradle which does allow that
<dependency>
<groupId>com.vexsoftware</groupId>
<artifactId>nuvotifier-universal</artifactId>
<version>2.7.3</version>
<scope>system</scope>
<systemPath>${project.basedir}\src\main\resources\nuvotifier.jar</systemPath>
</dependency>
This is what i did that worked, but it breaks on linux/GH actions due to backslashes
chill
if you post a help message in #help-server, someone will get to you eventually. We also do not provide support with pirated plugins
?ban @quaint mantle
Done. That felt good.
🎉
🥳
hmmm
what's wrong??
so linux/gh is the issue rn then? @tulip owl
the plugin was built with a newer version of java then you are running
how can i detect if an array does not contain a value?
if (array == []) {}
wym but not containing a value?
wrong java version
blank
Linear search
you need java 16, but you use java 8
if (!array.contains(value)) {}
Or use Arrays::binarySearch
primitive arrays have no contains method
@delicate cargo
Arrays do not have such instance methods
yea, but https://github.com/astei/SuperbVote/blob/master/pom.xml that one seams to work
thx
Cannot invoke contains(int) on the array type int[]
ohhh, I thought it was a arraylist
nevermind
Arrays.binarySearch(array,1); //returns the index in which 1 was found in
brb lunch
For instance
try and use their dependancy and repo maven code
Just what i'm doing 🙂
k
seams like it works
alright
Hello again I am having a problem with Events
hi forbidden! o/
heyy Blinky!
whats the problem?
k
java.lang.NoClassDefFoundError: Could not initialize class com.speederbox.hypercheat.hypercheat.Util.ReflectionUtils
i guess thats the reason
Ah
do you use external library in your project?
ProtocolLib yes
ye but it looks like library with this packet "speederbox.hypercheat.hypercheat" has not been compiled to .jar file
hypercheat is the plugin itself 🤔
noo
then use java 17
so maybe open your .jar plugin in winrar and check if this class in inside 'hypercheat.Util.ReflectionUtils'
can someone please wrtie some method how to sort plazers in tablist? optionally be best if i could set prefix to them
for 1.8 and 1.18
which class my main?
ReflectionUtils
It is
and you show me your plugin.yml file?
Okay
name: HyperCheat
version: '${project.version}'
main: com.speederbox.hypercheat.hypercheat.HyperCheat
api-version: 1.18
depend: [ProtocolLib]
authors: [ ForbiddenBoX, Speeder323 ]
description: This is a anti-cheat Plugin to make sure no one hacks.
hmm idk this exception java.lang.NoClassDefFoundError: Could not initialize class x appears always when some class is not compiled into jar file
show me content of that class ReflectionUtils
Okay got it
what was the reason?
I meant okay I will send the class
hmm this really means it could not find that class
ye
if you do code Class myClass = Class.forName("randomclasssomething"); you get the same error
wait let me give you the main class if I have not already
I think it might be about that
ah on ground is deprecated
Has anyone here used GitHub actions? i'm trying to upload a file as an artifact
name: Java CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 16
uses: actions/setup-java@v2
with:
java-version: '16'
distribution: 'adopt'
- name: Build with Maven
run: mvn --batch-mode --update-snapshots verify
- name: 'Upload artifacts'
uses: ./
with:
path: target/SVL-*.*.*.jar
var boundingBox = ReflectionUtils.getBoundingBox(player);
Object box = ReflectionUtils.modifyBoundingBox(boundingBox , 0, -yExpanded, 0,0,0,0);
return ReflectionUtils.getCollidingBlocks(player, box).size() > 0;
}
try do code like this
and check if exception is thrown by ReflectionUtils.getBoundingBox() or ReflectionUtils.modifyBoundingBox() method
Okay let me try that
Hey Jacek quick note when I start the server
[15:52:56] [Server thread/INFO]: Server permissions file permissions.yml is empty, ignoring it```
this happens
thank
np
Anybody know what the permission nodes for using items, like fishing rods? I can't find it.
class org.bukkit.craftbukkit.v1_18_R1.entity.CraftWolf cannot be cast to class org.bukkit.entity.Player
A wolf cannot be cast to a player
you need to check if the entity from the event is a player before you cast
Ah
How do I get the number of placed blocks? player.getStatistic
?
each statistic has an ID
oh it doesnt take a string
lemme check
I didn't find it(
its not in there
I see
hm
I dont think it is in there.
a gde?
gde?
yes
what is that
where*
how can i make a loop run from onEnable() without effecting the server?
You pass a material as a second argument to getStatistic
What statistic tho
Scheduler
There is no BLOCKS_PLACED statictic
how would i use that?
yes
So I wanna add a method to the Player interface (Player#setStatus) but i dont know how to implement that. Can anyone help?
Bukkit.getScheduler().runTaskTimer(MAIN CLASS, () -> {
},0, TICKS 1 sec = 20);
1 sec = 20 right
1 min
oh
sorry
?scheduling
yes
Don’t implement the player interface
ok perfect ty
Make a wrapper
Huh... weird
Can you tell me how? I am not that good in java
Make a class that holds the Player object as a variable
And then also has your custom methods
how?
So like this?:
Player p;
public void setStatus(Status s) {
}
}```
(ChatColor.of(new Color(r:134, g:255, b:16))
why r:134, g:255, b:16 highlighed?
Yes
Why are you prefixing them
bruh
But somehow the method doesnt show up if i call it in my Class (I am creating a command)
How do I get the number of placed blocks? player.getStatistic
so i saw this but i dont rly know how to create teams and add players to it
if anyone doesnt mind may you help me?
Team firstTeam = scoreboard.registerNewTeam("1");
Prisoners.addEntry(player.getName());
that works right
i figured that out but i have a new question
can I add uuids to scoreboard teams
ill use toString but isnt there a character limit
What version
player.sendMessage(ComponentBuilder ("Connecting you to the lobby!").color(ChatColor.RED).create());
// i use kotlin
mention me pls if you have a solution
1.8.8
48 then I think, 16 for prefix, 16 for the name, 16 for the suffix
If there's no prefix and suffix, it's just 16 but I'm pretty sure there is
but
Did you register it
im just adding an entry to a team, and the entry is a uuid as a string should i have to worry
Hmmm, not sure, might just try it and see what happens
a uuid is 36 characters long
what exactly don't work? did you tried printing some stuff? did you register the listener? AND don't use UpperCamleCase, use camelCase for local variables
What are you trying to do 2Hex
im trying to sort players by permission in tab
so if a player has a permission like o.owner
hes at the top
Huh, so it does not even detect the event to begin with
Yes
Bukkit.getPluginManager().registerEvents(new Damage(), this);
why doesnt this work?```java
public String isRecipe(ItemStack[] items) {
List<String> ids = new ArrayList<String>();
for (ItemStack item : items) {
if (item != null) {
NamespacedKey key = new NamespacedKey((Plugin)Main.instance, "itemid");
String id = item.getItemMeta().getPersistentDataContainer().get(key, PersistentDataType.STRING);
ids.add(id);
System.out.println(id);
}
else {
ids.add(null);
}
}
List<Recipe> recipes = new ArrayList<Recipe>(Main.instance.recipeManager.recipeMap.values());
String outId = null;
boolean recipeFound = false;
for (Recipe recipe : recipes) {
if (recipeFound != true) {
if (recipe.idsIn == ids.toArray(new String[9])) {
outId = recipe.idOut;
recipeFound = true;
}
}
}
return outId;
}
api version 1.18 not 1.18.1
in plugin.yml
My blockdata is not setting when doing this.
Block lookAtBlock = sender.getTargetBlock(null, 5);
if (lookAtBlock.getType() == Material.CHEST){
Chest chestBlock = (Chest) lookAtBlock.getState();
chestBlock.getPersistentDataContainer().set(LootChest.LOOT_CHEST_KEY, PersistentDataType.BYTE, (byte)1);```
it does set the state, when I do ```java
chestBlock.getPersistentDataContainer().get(LootChest.LOOT_CHEST_KEY, PersistentDataType.BYTE)```
it does return 1, but when I later do ```java
Chest thisBlock = (Chest) event.getClickedBlock().getState();
PersistentDataContainer chestData = thisBlock.getPersistentDataContainer();
dataByte = chestData.get(LOOT_CHEST_KEY, PersistentDataType.BYTE);```
in another event, the Byte will be set to null
why do i need to put 1.18 in yml?
ok its working, but im wondering why?
api-version does never have the last number
I dont know why
im working in 1.17.1 and I need to have 1.17 in api version
🤔
Do I need to apply the changes somewhere?
anyone?
theres literally no one here :(
if(Objects.equals(server.getName(), player.getServer().getInfo().getName())) continue; is there a better way to check if a server is not the same as another server? (server is the server i am currently looping over) (Bungeecord)
server == other?
Ensure the clicked Block has a TileState before trying to get the PDC
oh wait, servers have the same instance regardless of where they are then?
i would hope so
kinda like Blocks?
well there's basically no docs
time to try it and see then
how do I do that
instanceof TileState
But doesnt every chest always have a tilestate?
I already checked if its a chest before
yes, but only blocks with TileStates can have a PDC. so be certain you are actually testing the correct one
Don't got enough time to try it and see rn, ill just keep it as is and change it when i figure it out
but I think I found the issue, I didnt Chest#update() after
ah yes, you used a state so have to set it back to the block
ok
hey, does Inventory#addItem merge the item with equivalent items in the inventory if possible by default?
eg. adding 2 diamonds to a player's inventory with 31 diamonds would turn that stack into 33
oh ok
i think it just loops trough every stack, if it can fit what you want to add adds it to that, otherwise if no stack matches and there is air, it adds that stack, otherwise if there isn't air i think it drops it/dosen't do anything (assumption)
anyone?
please, when you ask questions, specify what do you mean by 'doesn't work'
well it always returns null
what returns null :)
and always the current id is null
send the error too when you have an error :) people can't help with 0 information
does the print statement execute?
well probably the reference equality 'recupe.idsIn ==' may cause the issue
what?
you should use .equals() instead
ok
on the line if (recipe.idsIn == ids.toArray(new String[9])) {
thats ok
the thing is
everything in ids is null
regardless of what i put in
diff class
well, are you sure itemstacks contain 'itemid' string?
yes
so the system out println prints null?
the problem is in the code where you set
WAIT
did you set item meta to the item?
after getting item meta, getting PDC and setting the itemid, did you set the item meta to the new one? @delicate cargo
This event is not working at all
it is called obviously
oh wait let me update that
why are you using first letter uppercase for method and variable names?
that is updated
so what do you do in game, that you expect it to trigger?
I hit the entity I expect that to output victim.sendMessage(distance + " is the distance");
and then a if statement
what entity?
that checks if you are 4.275 blocks away from the entity
do you hit player?
a mob like a zombie
but you're checking if damager is instance of Player
and the entity*
the entity you hit is obviously not player so the if is false
well let me remove the second part
and delete cast
Ah
event.getEntity() instanceof Player
wait what should this be then?
oh its just the entity
instead of casting
but you can't send message to entity
true
so you won't do victim.sendMessage
should I just broadcast?
if you want everyone to see it, then yes
The goal was to target the player that did it
is it possible for chunk load events to fire before a plugin has registered listeners? on server startup?
then send to damager
ah okay thanks
damager.sendMessage
okay let me do that and come back to you
ok
anyone know how I can loop through all the worlds (including multiverse worlds) ?
org.bukkit.Server#getWorlds and org.bukkit.Bukkit#getWorlds should return all currently actively loaded worlds of the server, including multiverse.
I've tried that.
and what's wrong?
just not doing what what im asking it to do.
you're comparing a string to the toString of a list of strings ?
reverse it, you should be checking if the list contains the name
not if the name equals the list
Thank you so much, one more question how do I check the distance between 2 entities because it does not seem to be working
entity1.getLocation().distance(entity2.getLocation());
if you don't need super accuracy
float distance = (float) damager.getLocation().distanceSquared(event.getEntity().getLocation());
Oh instead of squared
oh alright, thank you 😄
np
where do scoreboard teams prefixes appear
above players
is it in chat too?
I've never bothered to check
is it in tablist? if u know
what is the name of the web that i enter my plugin configuration of minecraft and it tell me the errors in the config?
“`if(e.getDamager() instanceof WitherSkeleton && e.getEntity() instanceof Player){
if(e.getDamager().hasMetadata("ExplodingZombie")){
e.getDamager().getWorld().createExplosion(e.getDamager().getLocation(),5,true);
e.getEntity().remove();
}
}
}“`
?
```java <code here> ```
i hasve 60 percent keyboard so i dont have it sorry

if(e.getDamager() instanceof WitherSkeleton && e.getEntity() instanceof Player){
if(e.getDamager().hasMetadata("ExplodingZombie")){
e.getDamager().getWorld().createExplosion(e.getDamager().getLocation(),5,true);
e.getEntity().remove();
}
}
}```
does anyone know why when it hits enemy it wont remove itself from world
after i use e.getEntity().remove();
Probably doesn't have the "ExplodingZombie" metadata
it does
double checked it
because it explodes when it hits player
but doesnt remove after
Oh, cause you're removing e.getEntity() not e.getDamager()
you're removing player!!!
- it's kinda strange that you check for instanceof WitherSkeleton and metadata ExplodingZombie
^
Is it possible to create a command only usable by the owner which excludes other ops? So far I have:
commands:
createvoidworld:
description: "Creates a void world with a specified name."
usage: /<command> <name>
permission: lambdaminigames.createvoidworld
permission-message: "§cThis is an owner-only command!"
aliases:
- cvw
permissions:
lambdaminigames.createvoidworld:
default: false
Do I need to use Java to do this or can I just do it from the yml?
You have to use Java as far as I know
Alright, do you reckon that player permissions could help me to avoid doing it in Java?
?
plugin.yml has very limited functionality
how do i check if opened inventory is player's inventory in InventoryOpenEvent
it's possible
u don't need protocollib
I remember people talking about this issue in a forum post. Something along the lines of the InventoryOpenEvent is not fired by the player opening their inventory
You have to listen to a packet instead
can u help me with the config error?
no u don't
Hey I wanted to ask that how to summon a mob on an event
u can check
If there was a packet for it why wouldn't InventoryOpenEvent be fired by it...?
Get the world you want to spawn the mob into and then world.spawnEntity()
?
You can't check when they open their inventory
for example, Bukkit.getWorlds().get(0).spawnEntity(new Location(Bukkit.getWorlds().get(0),0,0,0),EntityType.ZOMBIE);
yes u can?
It shows an error
Let me try
If you think we are wrong, register an InventoryOpenEvent, and open your inventory
have the event print something out
This will spawn a zombie at 0, 0, 0 in the default world you have server.properties pointed to
config error?
You're more than welcome to try both InventoryOpenEvent and to look for a packet that is sent, but it's very likely you'll come up empty handed.
i have an error and idk who
Whats the error
How do Anti-cheats look for this then? I thought you can read PacketPlayIn and PacketPlayOut classes as they leave and come in
How will I summon it on player cords?
can u tell me the error?
what you need to listen for is an inventory click as there is always a packet for that, that is the indicator that their inventory is open, also the client will send an inventory close packet for the player inventory even though the client never sends an open window packet for the player inventory
Look for what
The inventoryopenevent in the API is for when a player clicks on something like a chest
since a packet is indeed sent for that
InventoryOpenEvent is for when they open a chest not click in it
That's for InventoryClickEvent/InventoryInteractEvent
that is what I am implying
You can replace the new Location(Bukkit.getWorlds().get(0) with player.getLocation() Where the variable player is of the interface Player
but its not limited only to a chest so anything that has an inventory window that the player interacts with will send an inventoryopenevent, just not the players own inventory 😛
Look for when a player can move around while having their inventory open