#help-development
1 messages · Page 1554 of 1
If all else fails just clone and publish it to local
^
Pretty sure that can be avoided
Idk haven’t given it a shot but you could maybe force compile or something if IntelliJ allows that
It’s maven but on steroids
I mean, you don't need to really do anything
you just press the publishtolocal thing in intelllij
and feed it the spigot jars if it asks
That's what gradle does
gradle is basically maven just in a different programming language
such a stoopid name
yhuh
See you in 2 hours
is there a script anyone has to automate it?
after 1TB of memory
codemc has a repo for nms iirc
add this to the gradle
repositories{
maven{ url = "https://repo.codemc.io/repository/nms/" }
}
ok
kk
np
Hello !
I'm wondering something: I try to create a player skull a Player but they ask me an OfflinePlayer ...
The player skull's owner is online everytime, so should I do an OfflinePlayer to match ?
Maybe is there an other way to do ? 🤔
shit
Ahh !
Didn't look at this, ty ^^
which one
what is sound for beetroot plant breaking?
publishToMavenLocal
causes that
Only other thing I can think of is just getting rid of one of the outputs
I'll look at the gradle real quick one sec
ok
Can't see off rip
that's the file that is giving you issues though maybe you can do some googlefu or wait for pulsebeat to wakeup so you can yell at him
what would be the best way to wait for a world to load? my plugin is on POSTWORLD, but since i'm using multiverse some worlds won't be loaded when the plugin starts running
right now i'm waiting 30 seconds(🤮) in onEnable so that worlds load in properly but that is pretty unreliable and i'm sure there's a better way
I could be wrong but isn't there a world load event?
You are correct
declaration: package: org.bukkit.event.world, class: WorldLoadEvent
i'll check that out, thanks
👍
Hi Uhh im having a problem with my multiverse core. I want to teleport a random player who touches in the button to another world, but the @p command doesn't work. Can u help me
for(ItemStack item : player.getInventory().getContents()){
//if(item.getType() == material) continue;
hasAmount += item.getAmount();
}
Why this returns null?
empty slots probably
I also did if(item == null) but IDE said that item will never be null
check if the type equals Material.AIR
but I even can't use item because it will auto gives me an error
like I can't do if(item == null)
item itself isn't null, but trying to get the amount of air throws an NPE
your are smart
or getting the data too ig?? idk
i don't fuck with air 😂
omg i have ur ip now
exposed
my IP is 193.77.80.107
also if you're just trying to get the contents of the player's inventory, use getStorageContents instead
getContents returns items in the armor slots and offhand
what code are u using
if(item.getType().isAir()) continue;
then getType() is null?
int hasAmount = 0;
for(ItemStack item : player.getInventory().getStorageContents()){
if(item.getType().isAir()) continue;
if(item.getType() == material) continue;
hasAmount += item.getAmount();
}
yeah I have null checks in my IDE and no issues with it saying it can't be null
for (ItemStack item : sellGUI.getInventory().getStorageContents()) {
if (item == null) {
continue;
}
if (item.getType() == Material.AIR) {
continue;
}
if (isIllegalItem(player, item)) {
continue;
}```
ur ide is on something man idk what tho
try running it with it still on there and if it works just add an exception for that line
im using 1.16 API
maybe 1.15 has NotNull in item
🤷
int hasAmount = 0;
for(ItemStack item : player.getInventory().getStorageContents()){
if(item == null) continue;
if(item.getType() == null) continue;
if(item.getType().isAir()) continue;
if(item.getType() == material) continue;
hasAmount += item.getAmount();
}
hahaha what else can I try XD
ok what
it's like always null XD
what exact line is throwing it
if(item == null) continue;
what 😂
hahah yeah exactly 😂
Spigot API broken
let me update to 1.16
With Spigot 1.16 item can be null XD
😂
with 1.15 can't be null but it still is XD
now it's working 😂
haha API is broken for 1.15
Error before was definitely just not you updating the plugin
Unlucky tho, incorrect null annotations
If you want to support old versions it's much better to use api from older versions
Yeah but you risk this
for example if you use api from 1.8 you will know everything would works on 1.8
Annoying life
but if you use api from 1.16.5 then you need to be careful which methods you are using
then you need to like search for every method if it's available on 1.8
haha I really care to support as much versions as I can.
from 1.8 to the latest on all my plugins
also newer versions like 1.17 or 1.18 support like max 30 players
so almost all servers will stay on 1.16.5
wouldn't it be if(item != null) continue;
Hi, is there a way to prevent players using minecarts with chests and hoppers?
I'd assume it'll be caught by the interact event
What should I do if I accidentally messed with randomtickspeed?
just put it back to 3
[14:39:05] [Paper Watchdog Thread/ERROR]: Current Thread: Worker-Main-1
[14:39:05] [Paper Watchdog Thread/ERROR]: PID: 16 | Suspended: false | Native: false | State: WAITING
[14:39:05] [Paper Watchdog Thread/ERROR]: Stack:
[14:39:05] [Paper Watchdog Thread/ERROR]: sun.misc.Unsafe.park(Native Method)
[14:39:05] [Paper Watchdog Thread/ERROR]: java.util.concurrent.locks.LockSupport.park(Unknown Source)
[14:39:05] [Paper Watchdog Thread/ERROR]: java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
[14:39:05] [Paper Watchdog Thread/ERROR]: java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
[14:39:05] [Paper Watchdog Thread/ERROR]: java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
[14:39:05] [Paper Watchdog Thread/ERROR]: java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
[14:39:05] [Paper Watchdog Thread/ERROR]: java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[14:39:05] [Paper Watchdog Thread/ERROR]: java.lang.Thread.run(Unknown Source)
[14:39:05] [Paper Watchdog Thread/ERROR]: ------------------------------
/gamerule randomTickSpeed <value>
As soon as I join the server it lags out and eventually turns itself off
So I can just cancel the interact event if the entity is minecart with a hopper/chest?
ok, thanks
Anticheats would ban everyone XD
Is the cmd case sensitive in console?
or not maybe they will check your default radomtickspeed
gamerule command is case sensitive, yes
iirc
idk but the default is 3
It's probably a short
I need help with my plugin.yml. I have a command with multiple options, one is thaf you dont add any otver words to it, just /baldify. Then you can /baldify a player and then everyone with *. How do I write that in the plugin.yml?
/baldify
/baldify Notch
/baldify *
Those are the commands
0 - your server will die immediately
just add /baldify to your plugin.yml and do perms manually with player.hasPemission
Its not perms its multiple otger labels
Like essentials has smite
You can smite a target location with just /smit
You handle that in the command method
just add /baldify to your plugin.yml
Oh ok so the
Ok
I have two commands in my plugin but both get run when I run this one
Im using the this.getCommand().setExecutor
And then in the command file I dont have any checks to see if the command is /baldify (if(label.equalsignorecase))
Should I add that?
You should give each command a different executor class
Oh im stupid sorru
They do simular things so I copy pasted one to another and forgot to change the part
Its just a stupid mistake
public static Item getAttributedArmor(Item item, int amount) {
ItemStack is = item.getItemStack();
net.minecraft.server.v1_12_R1.ItemStack nmsStack = CraftItemStack.asNMSCopy(is);
NBTTagCompound compound = (nmsStack.hasTag()) ? nmsStack.getTag() : new NBTTagCompound();
NBTTagList modifiers = new NBTTagList();
NBTTagCompound armor = new NBTTagCompound();
armor.set("AttributeName", new NBTTagString("generic.armor"));
armor.set("Name", new NBTTagString("generic.armor"));
armor.set("Amount", new NBTTagInt(amount));
armor.set("Operation", new NBTTagInt(0));
armor.set("UUIDLeast", new NBTTagInt(894654));
armor.set("UUIDMost", new NBTTagInt(2872));
modifiers.add(armor);
assert compound != null;
compound.set("AttributeModifiers", modifiers);
nmsStack.setTag(compound);
is = CraftItemStack.asBukkitCopy(nmsStack);
item.setItemStack(is);
return item;
}
I'm using that, The item I get can be applied everywhere and even works when being hold
i think he just hovered over the warning in his IDE and clicked on "add assert bla bla"
Don’t we have an API for attributes
NMS exists
yea so
Why would you use NMS when there is an API
if there is a workaround, you should use the workaround instead of NMS
same as for reflections
i don't think think there is a workaround
Don't we have an API for attributes
so the main issue for me is, The armor gives the play protection when even hold
smh
Well there you go, have a solution
I see, So I won't even need NMS?
no
typical outdated person mindset
scurry to nms first before even looking at the api
I tried googling, That is what first came up
then your googling skills need improvement
I just searched "NBTTags Bukkit API"
Oh well, I should have searched Spigot API
Myes nbt isn’t exposed in spigot api
ikr
You’re blessed with the persistent data container api and other abstractions instead
is there any example out there for applying AttributeModifier?
yes, many
don't search for nbt tags
search for attribute modifiers
nbt tag is the most generic form of thing an item or an entity might have
Just Fucking Google It helps you help others to use Google and search on their own!
they are used for and represent everything
it is like trying to search for a new oil filter for your 86 model toyota hiace by googling "car"
got it
why did you write it 2 times?
hm
because I can't see the first message
some connection issue with the client drops message feedback at random
@ivory sleet let our messages alone >:(
now conclure deleted the duplicate and I still can't see the original
xD
Should have deleted the former one
does any vehicles plugin have actual proper physics
think the most orientate on the players physics
I don't see a Set_Base_Value or smth
I don’t think you can change the base value
like, when say a car is placed on an unlevel surface, it would rotate as if it were a real object
Unless you do hacky reflection
instead of just a model spinning in a cubical bounding box
but don't do that
reflections are always bad
you can't modify base values
Yeah most cases
those are hardcoded into the game
no, you added a modifier
base value = 0.0?
Big brain
hmm
sus
alright, i'll try by adding
For the name argument, I guess its supposed to be "generic.armor" right?
unless you do your own little framework, util, api stuff thing, its fine. otherwise you should always prevent it
Yeah I guess
its like a pool without water with a barrier tape but with reflections you jump over that into the pool
🥲
Uhhh, if I use attributemodifier i won't have to set the proper slots right?
i don't have the effort to dive into nms to deal with collision shapes and shit
i'll just define a bunch of points along the model of the vehicle and spawn armorstands there to collide with shit
and apply velocity to each of them to keep them in the correct position relative to the vehicle
and apply reverse velocity/angular velocity to the vehicle to equalize the errors in their positions
Is there any other way to change what item drops with config .yml but I want to do this with every single block so I don't think config.yml will help me here
if you want to CONFIGURE it, you will have to use a config
UHH, Spigot 1.12.2 doesn't have ItemMeta#setAttributeModifier
and it doesn't have EquipmentSlot for "AttributeModifier"'s constructor
consider using a version that isn't half a fucking decade out of date
or perhaps, if you like 1.12 so much, you should put some effort towards maintaining it
like other people around other projects do
To be fair I expect people to be on the latest version
And I thought the API was in 1.12, guess not
hmm, Just a suggestion please don't say non-sense to people without understanding full question
it wasn't non-sense. using nms is bad. also you clearly doesn't understood your own question, otherwise you wouldn't have tried
i ask you the same question I ask the 1.8 plebians
why do you use it if the api sucks?
why does the api suck if you still use it?
why aren't you doing anything about it?
It's not me who wants to use 1.12.2, It's my client
leave it i found a NMS way of assiging slots
why, out of all of the projects out there, it is you outdated fucks that wallow around cobbling together barely functional nms and reflection based solutions to problems that have already been solved properly in the modern api
solutions that you could trivially backport to your version of choice
your client? do you mean the server who forces players to do a screenshare and show all his files?
why is it that despite everything being fucking shit and inoperable you don't do anything about it
no
not crackpixel
it's like looking at a thousand headless chickens running around aimlessly, each one repeatedly struggling to solve the same problem and coming up with a shitty solution
crackpixel doesn't even use 1.12-
what is it that prevents you fucks from forming a community and actually maintaining the version you find to be so good and popular
projects with way smaller communities do it
Cause it's a bunch of kids
bump
they should grow up
The hell is a crackpixel
it's already been 7 years
NNY chill a little bit
how many more years do they need
seems like a crappy server forcing players do share their files
and if they don't want to share their computer thingys, they get a permanent ban. pog
Run buildtools for your version, switch dependency from spigot-API to spigot
i've done that but where do i find the net.minecraft.server package
is it inside the server jar? because i don't see any of the classes that i think are supposed to be in nms
It’s inside the compiled spigot jar, yes
w h a t
theres not a thing for admin message but you could just loop through every player check if they have op or a certain permission that admins have and then send a message to them
Bukkit.broadcast
Lmao
it takes a permission node
it does?
yes
i didnt know that
yep
cause of that its not thread-safe
shouldn't. and if, its not noticeable at all
so it basically does the same thing as the for loop looping through all the players and sending them a message?
or is it something else
most likely, didn't looked at the code. should also send the message to the console iirc
the code whispered to me that its just checking every CommandSender for the given permissions and adding them to a list, if they have the permission.
then an event is called and if its not cancelled #sendMessage is being executed for every CommandSender
seems like ops have the permissions to receive your broadcast anyways
just add any permission you want to check for and ops will probably receive it too
"yourplugin.admin.recievecommands"
lol
jk
but just put anything
im bored lmao
We're no strangers to love
You know the rules and so do I
A full commitment's what I'm thinking of
You wouldn't get this from any other guy
I just wanna tell you how I'm feeling
Gotta make you understand
Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you
We've known each other for so long
Your heart's been aching but you're too shy to say it
Inside we both know what's been going on
We know the game and we're gonna play it
just copied some lyrics from google
and bam you got rickrolled :)
jk
why can't I cancel opening inventory or placing an item in a hopper?
Is it possible to do some maven commands so you can install a jar file to a Maven repository in (Java) code? (Like BuildTools)
You're not cancelling
mvn install
How do I do that properly?
installs your artifact into your local maven repo
Yes and where to run it? I want to run this in Java code
oh, right. Thanks
oh. idk
Like creating a program which installs the file for me
call the mvn script from java ?
this one still doesn't work. Is it even possible to prevent accessing the inventory like that?
I don't even know what that means 🙂 I just copied it from somewhere
or remove it
I'll set it to HIGHEST, but I don't think it would solve it
Any ideas how I can prevent players accessing minecrart's inventories without destroying the minecarts?
why not just make it so you cannot put items in or out of the minecart?
Sorry about that
Lmao
I’m still developing the library, and the docs are severely outdated
Also I’m on vacation for another like 4 days so I can’t code until then :Sadge:
I'm trying to do just that after realizing I can't prevent opening the inventory. But I'm not sure which Event I should use. Is InventoryClickEvent good for that?
I have a (hopefully) quick question:
In some of my plugins i use SQLite. Currently I bundle the whole sqlite-jdbc-3.xx.xx.jar file in my plugin. As far as I have understood from the announcements SQLite is already bundled in spigot and can be used in plugins as well.
Now: How do I do it? What do I need to change to use the spigot SQLite?
you simply do not include it in your dependency list and do not shade it
SQL drivers are purely runtime anyway and should only be used through the java.sql interface
How can I add a have a line space in between these 2 lines
But am I even able to use saveDefaultConfig with a custom yml file
all of the storage minecarts have their own material
@wraith rapids doesn't saveResource look for files in the jar?
oh
so then what path would I use then
yea but the path is unsynced
but did you mean like src/main/resources/messages.yml
No, it will be the path in your jar
that would be the path in my jar
No, thats the path in yoru project
actually no
yes, but argue all you like
If you copied your resources correctly they will be in the root of your jar
is it better to use runnable or time stamps to manage cooldowns?
depends on teh length of yoru cooldown
i dont know, im making a kit plugins for another person to configure it, he might use 3 days or 10 seconds
Imo time stamps
in that case, timestamps
k thx
right so I believe im using the corret path and it can't find that path GrantIt/messages.yml
do you have a folder inside your jar called GrantIt ?
yes
ok, there is no GrantIt folder inside your jar. they are in the root, so just use the file name
ugh no new line was made
new line?
Why doesn’t it work?
My plugin.yml
trying to add a space in between them
You can;t add a space via code(not easily) add it in the resource.
I did elgar
?paste your resource
^
public void onEnable() {
messageConfig.setup();
config();
saveResource("messages.yml", false);
messageConfig.reload();
}
public void config() {
messageConfig.get().set("not-person", "&cYou must be a player to execute that command.");
messageConfig.get().set("no-permission", "&cYou don't have permission to do this!");
}
You never save teh resource as you already create the file in code
yea i do i have messageConfig.save()
remove all your other code and just do saveResource and reload
It can’t be displayed.
It doesn’t pop up.
And I have no idea why.
I don’t know?
How check?
It says 0
Yes
?
It says permission.yml ignoring
look in latest.log
but then I wouldn't be able to do messageConfig.get().getString("no-permission")
I just send a picture look ⬆️
You sent a useless picture
What more do you want?
yes you would, after you reload
How do I do that?
Your issue is that you are adding sections to your messages.yml before you save the resource. If the file already exists the resource will not be copied from your jar into your folder.
?paste
Should I just paste it all?
All there is in the latest.log is already on my picture.
don't I need to call config(); though
main: me.Erawan.HelloWorld.Main
name: HelloWorld
version: 1.0
author: Erawan
commands:
Hello:
usage: /<command>
Does it need anything?
Then?
this is how im reloading my config though fileConfiguration = YamlConfiguration.loadConfiguration(file);
Server permissions file permissions.yml is empty, ignoring it.
That's what it prints.
and that would make it null
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
public class Main extends JavaPlugin {
@Override
public void onEnable() {
}
@Override
public void onDisable() {
}
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if(label.equalsIgnoreCase("hello")) {
if(sender instanceof Player) {
Player player = (Player) sender;
player.sendMessage(ChatColor.RED + "Hey welcome to the server");
return true;
} else {
sender.sendMessage("Hey Console!");
}
}
return false;
}
}
so ima do this
wat if theres another plugin that has a main class in me.Erawan.HelloWorld.Main
Then what is?
What do you want?
It is.
Plugins.
In my Spigot server.
Folder.
I can't tell if you are being ironic or nah.
How?
It's pasted right in there.
what if hes running a vanilla server
LOL
but what if the server jar you have isnt spigot
Yeah, that would be a problem.
what is the output of /version
or ingame
It says wrong.
in the server shell it would obviously just be version
When I type it.
oh my this message is annoying Could not save messages.yml to plugins\GrantIt\messages.yml because messages.yml already exists.
Me?
Is there anyway to modify a Score's object name without resetting the scoreboard ?
Not with commands
Oh.
final Scoreboard board = Objects.requireNonNull(Bukkit.getScoreboardManager()).getNewScoreboard();
final Objective objective = board.registerNewObjective("TEST", "dummy", ChatColor.RED + "Test but in red");
objective.setDisplaySlot(DisplaySlot.SIDEBAR);
objective.getScore(player.getDisplayName() + " : " + coins + " coins").setScore(0);
player.setScoreboard(board);
I'm currently doing that
You need 4 lines to handle your two configs.
saveDefaultConfig();
saveResource("messages.yml");
messages = YamlConfiguration.loadConfiguration(new File(getDataFolder(), "messages.yml"));```
But if i need to add new lines to my thing I need to re-set them every time i update the scoreboard
And i want to avoid that as i can be very heavy
i am not using commands
oh yeah
I thought I wasn't suppose to use saveDefaultConfig();
why not?
ok, why are you using a custom config when support for teh config is already built in?
because it makes it look cleaner
cleaner? you literally just renamed your config.yml to messages.yml and have to add extra code to handle it.
yeah
Thats not cleaner
easier to find stuff
like im not gonna put everything in config.yml
that's just stupid
if you name it config.yml all you have to do is...java saveDefaultConfig();
Im gonna have multiple config files
thats fine, but don;t throw away the already supported config just for that
thats fine, then do as I said above, 4 lines gives you both config and messages
How is this still going on
what is?
you working on your problem
Longer, I took my dog for a walk in the middle 🙂
anyways why did you want me to do YamlConfiguration.loadConfiguration(new File(getDataFolder(), "messages.yml")); when what I had worked?
tf is this
Its just showing you how to handle both config with 4 lines. You also utilize the saveDefaultConfig method as it guarantees the folders are created
There's 6 of em
hold up
nvm
that messes up my command
How can that mess up your command? All its doing to creating/loading teh configs
am I suppose to do plugin.getConfig().getString() now?
yes
My dude how is this so hard
🖕
lmao
lol
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
no you
it was towards Rack
Is there a reason why I can't just use messageConfig.get().getString?
hunted.setColor(ChatColor.BLUE | ChatColor.UNDERLINE);
App.java:[21,40] bad operand types for binary operator '|'
😒
Apparently not
That's dumb
wouldnt u use + or is it something else
- also doesn't work
isnt the chatcolor api from bungeecord tho
No biggie, it doesn't need to be underlined
yeah the chat color system is pretty shitty
so I can get the config
^ yes the above person is attempting to make a secondary configuration file
Which is easy but they have somehow complicated it
👍
but still 🖕 to you Rack
lmfao wtf
whats going to happen with 1.17.1?
wdym?
oh noes!!
1.17.1 isnt even fucking released....
ya but pre-releases?
will it just be client bugfixes or server software need to be updated
server software update
Past versions they've had different server versions, I imagine it would be the same here
pretty sure at least
ok
i'm making commands using the BukkitCommand class(without using the plugin.yml) since I need to add them in real time
they work fine but they don't show up in the autocomplete
(https://www.spigotmc.org/threads/small-easy-register-command-without-plugin-yml.38036/ this is what i used for adding a command without using the plugin.yml)
(how do i fix this?)
ty!
is there a way to make different chats like /chat all or /chat group that type of stuff and is there a way to toggle chat off
you have to do autocomplete yourself i think
i looked for the tabcompleter class but it seems to only be for suggesting parameters
didn't it happen to 1.16.5?
1.16.5 added piglin brute
¯_(ツ)_/¯
commandmap?
wtf is the BukkitCommand class
?
dont ask the same thing in multiple channels, its fucking annoying
but idk which channel i need to ask it so i ask in both
you pick one, and if its the wrong someone will tell you and you can move
seems like that would be common sense
is it tho?
Just make a chat target object, and have some collection of which players will receive the message, or one of the other 100 ways of doing it.
i think i'm doing something wrong: i can't seem to find my command in help yet but in that article, his command shows up
w h a t is the BukkitCommand class
we never would have guessed that from BukkitCommand class
yeah, but thanks to me we figured it out!!!
well i use the commandmap and not the BukkitCommand class so i have no fucking idea what it is
i know that guy, hes 13, he asks literally every single detail when making a plugin
jesus christ, explains a lot
lol
i remember once he asked me how to ask if someone could make a plugin for him
🤣
and then asked me where to ask if someone could make a plugin for him
sounds like something a 13 year old would say
I'm sorry for interrupting you guys but I need to do a quick question. Should I do something that auto-update my commandManager? So that I don't needs anymore to edit my old plugin if I fix a bug in my command manager...
ok thats nice
if you make a autoupdater you should add so you can disable it
im not sure if you can edit a plugin, you can use sql to warn the user when they can download a new version
is spigot still experimental?
?
1.17?
Yes I was thinking it.
also to update a server do i just change the jar
How can I check if a user is in my custom GUI. Can't find anything about it online
yea 1.17 one
no its isnt
1.17 is unstable
kinda
oh rip
its a little unstable
ye hella unstable
wdym
what are you trying to do
but its better than what it was before
so the risk of upgrading to 1.17 is that i lose world files correct?
so if i back them all up
I want to detect if a player has my GUI open or if they are in another gui
nobody asked you
i should be fine?
nobody asked about ur grandmas death
not that
something else
i think you can use viewers
Thanks
im not sure tho, you might wanna remake the question
so what risk is it
its unclear
well mostly crashes and high memory usage
bugs
i mean yeah your world could corrupt
1.17 is 💩
My question was, do I really needs something like that? @wraith rapids Do you ever needed a thing like this one? A lib that inject some jars into your plugin and if need it updates them?
i have alot of experience with 1.17 and like DONT use it
Rip
performance has dropped by like 95%
the server crashes chunks dont load and alot more glitches
should i use 1.17 api or my plugins
Im using an inventory click event, if a player has clicked my inventory I want to cancel it. But if they aren't using my inventory then dont cancel it
idk i only have experience with running a 1.17 server
if you use the 1.17 api it will work but you gotta make sure you dont use 1.17 specific things for compatibility
okay
do you want to dm me? you might have a problem with how inv work
so 1.17 api isn't buggy
I just want to know if they is a way to see if a player is using my inventory
well the api just interacts with the server
check the title
Thats one way of doing it
you want to cancel the event when a player is using the inv you created but not any other inv
right?
Ye
You pinged me @wraith rapids
you should create a inv, add theitems and then on inv click event check if the clicked inv is the one you made
like this:
What did ya want
isnt persistent data 1.14+?
idk
yes
it was just a random test
lol so if you want your plugin to support 1.12+ you cant use persistent data 🤣
1.12 is for nerds
ye like why would u make 1.12 server what does 1.12 have that other versions havent
ok ye thats the only reason
he meant the project in general
question: isn't this class basically useless???
so what happens if i make a plugin for 1.14+ and add it to a server that supports 1.8+, will the player brake the plugin, not load it at all ?
or is there something that for some reason requires another class that's identical to the Command class
CommandMap?
it's used once in the SimpleCommandMap class
i still don't know why it doesn't just use the Command class
because BukkitCommand and Command are the same(?)
How can i use build tools for maven?
What do you mean? what are you trying to do
ok
show your pom
👋
yep
that is me
No - the client was really stupid
i didn't find any packets that were sent
at all
the mouse movement still worked fine on their actual player
just w/a/s/d/space/crouch did nothing
and
after doing more testing it appears that the player turning was a client thing
the packets didnt get sent to the server
so other players couldn't see it
PluginCommand vs BukkitCommand obv
ah so it's just to differentiate
<repositories>
<repository>
<id>papermc-repo</id>
<url>https://papermc.io/repo/repository/maven-public/</url>
</repository>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<repository>
<id>papermc</id>
<url>https://papermc.io/repo/repository/maven-public/</url>
</repository>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.destroystokyo.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.13.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.MilkBowl</groupId>
<artifactId>VaultAPI</artifactId>
<version>1.7</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>minecraft-server</artifactId>
<version>1.13.2-SNAPSHOT</version>
</dependency>
</dependencies>```
No
Did you try putting them in a vehicle and then using the drive packets?
yeah
try depending on spigot
not minecraft-server
Okay
Ummm
i cannot really remember
lemme open intellij real quick
How do I get sign rotation like on which block sign is placed?
yeah he means u
Can you send the dependency?
WallSign ziga
Ah yeah
bye bye all sign shop plugins
ye
They removed nms in paper
And spigot
I have build tools but its not working
So how can i use nms
I'm using maven
is this XMaterial? https://github.com/CryptoMorin/XSeries
uhh protocallib
protocollib isnt nms and im pretty sure thats only for protocol things in nms
like packets i think
Can i clarify what u mean by this
If I understand you correctly you were keeping the player in one place but spectating some other entity and wanted to "drive" that other entity?
Yes
Sorry, but I am new to spigot plugin development. On what event is reload run on? (Is there a doc full of all events or something?)
/reload shouldnt be used
isnt nms just apckets or does it represent the source code of mc
no nms is source code for the server
okay
My idea may not work but if the player is in a vehicle does it generate teh drive packets?
net minecraft server
check the worlds and see if they are empty or something
server is the packagename lmao net.minecraft is the domain
but its reversed
Obviously when a player is in a boat for example it sends the STEER_VEHICLE packets
NO clue what the packets are but I remember seeing someone talking about controlling all entities when ridden
teleport?
@Override
public void onLoad() {
if (Bukkit.getWorlds().isEmpty()) {
} else{
}}```
does he want to recreate MrClayFish's vehicle mod
it like puts the player to third person perspective when they ride in a car
?
ElgarL ❤️
what?
nice
thank you
that is me
ohhh
my camera is disconnected from my body
is there some magical method that adds a command to autocomplete
if(!(event.getClickedBlock().getState() instanceof WallSign)) return;
this one not working
Uh wym?
/ reload is a command, you can use onCommand to run custom commands, if you are trying to reload the plugin then you need something else, if you are trying to create your own custom reload command wich i dont recommend then you can register a new command, and i think that overrides the normal reload command
it return even tho it's wall sign (Sign on the chest)
no if you want to ovewrite /reload you need to use the commandmap i believe
im gonna try some stuff first @wraith rapids
no idea, still overriding a command is not a good idea
my plugin allows for command creation -> i can't use plugin.yml since commands are being created at runtime -> i have to use bukkitcommand instead of making a commandexecutor -> for some reason commands aren't suggested in chat
add weight cuz cars plugins move all at the same speed
why
OHHH thats really cool
well you need the commandmap then
i have the commandmap
add a shifter
i'm registering the command
yeah i'm using BukkitCommand but i'm still registering it using the commandmap
¯_(ツ)_/¯
show code
ok wait i'll just clean it up a bit
might be a client issue
older versions on a newer server might make it not display it in the tab completion
code in main class:
public void reloadCommands() {
Set<Entry<String, Location>> entrySet = commands.entrySet();
for (Entry<String, Location> entry : entrySet) {
// This associates the command names with the command block location
CustomCommand cmd;
String name = entry.getKey();
Location cmdBlockLocation = entry.getValue();
if(commandExecutors.containsKey(name)) { // commandExecutors is misleading: it's just a hashtable associating command names with their BukkitCommand class
cmd = commandExecutors.get(name);
}
else {
cmd = new CustomCommand(name, cmdBlockLocation, this);
commandExecutors.put(entry.getKey(), cmd);
}
//cmd.register(commandMap);
commandMap.register(name, cmd); // registers command, it works fine but for some reason it won't suggest it in chat
myFileConfig.set(name + ".x", cmdBlockLocation.getX());
myFileConfig.set(name + ".y_", cmdBlockLocation.getY());
myFileConfig.set(name + ".z", cmdBlockLocation.getZ());
myFileConfig.set(name + ".world", entry.getValue().getWorld().getName());
save();
}
}
my client is on 1.17
¯_(ツ)_/¯
also commandExecutors is misleading
it's just a hashtable associating the command names with the bukkitcommand class
welp idk cuz it normally works for me
install:install-file, -Dfile="C:\Users\<>\IdeaProjects\TvheeAPIRepositoryInstaller\work\TvheeAPI-1.6.0-01.jar", -Dpackaging=jar, -DgroupId=me.tvhee, -DartifactId=TvheeAPI, -Dversion=1.6.0
What is wrong with this maven command? I get The syntax of the command is incorrect.
what is the , for
you dont need the ,
That is how Java prints arrays, I don't use it in the actual command
Ok
and the command will work
Uh isn’t that Arrays.toString
Or smtng
but you dont use , in commands
Exception in thread "main" java.lang.RuntimeException: Error running command, return status !=0: [C:\Users\<>\IdeaProjects\TvheeAPIRepositoryInstaller\work\apache-maven-3.6.0/bin/mvn.cmd, install:install-file, -Dfile="C:\Users\<>\IdeaProjects\TvheeAPIRepositoryInstaller\work\TvheeAPI-1.6.0-01.jar", -Dpackaging=jar, -DgroupId=me.tvhee, -DartifactId=TvheeAPI, -Dversion=1.6.0]
at me.tvhee.tvheeapi.repositoryinstaller.Builder.runProcess0(Builder.java:257)
at me.tvhee.tvheeapi.repositoryinstaller.Builder.runProcess(Builder.java:186)
at me.tvhee.tvheeapi.repositoryinstaller.Builder.runMaven(Builder.java:178)
at me.tvhee.tvheeapi.repositoryinstaller.Builder.start(Builder.java:134)
at me.tvhee.tvheeapi.repositoryinstaller.Bootstrap.main(Bootstrap.java:31)
Is the full error
Cuz java just prints arrays with [ for each dimension and then then Lqualifiedname; iirc
Or the default toString rather
Code
Got parts of Spigot's BuildTools, but I can't find how they run Maven commands after downloading the Maven directory
Through nms yeah jeff

ok
so
i have a yaw and pitch of a head look packet
i need to now apply that to an entity
anyone know how?
have you figured it out?
you gotta sync commands
for newer verisons
sync commands?
yeah
public static void syncCommands() {
try {
Method m = Bukkit.getServer().getClass().getDeclaredMethod("syncCommands");
m.setAccessible(true); // just in case
m.invoke(Bukkit.getServer());
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
e.printStackTrace();
}
}
interesting
thanks for the help, i'll try that
this will make it appear in tab complete
if you're using the server jar you could just cast server to CraftServer
can anyone please help me with maven ? I'm trying to use my github repo as a maven repo, I'm following this tuto: https://dev.to/iamthecarisma/hosting-a-maven-repository-on-github-site-maven-plugin-9ch
I'm getting this errorcmd Failed to execute goal com.github.github:site-maven-plugin:0.11:site (default) on project BaseAPI: Error retrieving user info: Not Found (404)
Here is my pom.xml: https://hastebin.com/midahesoka.xml
Isn’t that just sending a packet to every player updating the command list or something?
yes my settings.xml has the rights credentials
pretty much
that's funny, i was thinking of something about reloading the command list
👍
Uh sort of
but on their own
No they have a limit
What r u doing btw
Oh well, maybe derive an nms entity and then just override the rotation logic
Man
That sounds like more work than i wanted
wait
armour stand can look up and down right
im pretty sure i didnt have to do syncCommands on 1.16.5
you do
just modifying the commandmap doesn't update it
Spigot calls it for you under bootstrapping
well yes but he's modifying the command map
is there a way to not detect player inventory click in InventoryClickEvent? like detect clicks in chests, but not in the player's inventory
bootstrapping?
thats why registering on start works and tab completes
Yeah exactly, it does sync commands whilst bootstrapping
if you do it later on you gotta sync it manually
oh wait i had the register in the onEnable is that why i got tab completes
thanks a ton, works perfectly
you're welcome 👍
Can anyone take a look at my problem ? #help-development message
yeah it calls syncCommands after enabling a plugin
or it might be after all plugins have loaded
can't remember
Yeah latter
yeah makes sense
It also ends up being where most of the coupling in your application resides (it has to reside somewhere), but this is a side effect, not the purpose.
In more general terms, a bootstrapper is just a class or method which prepares/configures a group of classes/objects or an entire API for your specific needs and use.```
Taken from fake stackoverflow
lol
But yeah bootstrapper is the classes responsible for starting up the entire application
Bootstrapping is the process itself
i cant find that
on google
i looked on the whole 1 page i only look at
