#help-archived
1 messages Β· Page 84 of 1
cool
Or they dont take into account servers that support 1.8-1.15x
How do I teleport the player with a teleport cause
PlayerTeleportEvent pte = new PlayerTeleportEvent(player, nextLocation, lastLocation, TeleportCause.UNKNOWN);
Bukkit.getPluginManager().callEvent(pte);```
because that does not work π
isnt there a method Player#teleport(Location, TeleportCause)?
ffs π¦
^
i hate eclipse
IntelliJ I tried switching too but it was just really frustrating to relearn stuff I already knew how to do
it didn't work with my already defined maven, the source code directly didnt sync up
the code completion by default is case sensitive which was annoying to figure out
ah, i restarted all my work, so it was easy for me when resetting my pc.
intellij keybinds.. some of them
I know it's all nitpicks it's just the few hundred small things that add up to a really annoying experience
CNTRL + ALT + L
best combo
i have no idea why intellij doesn't auto import by default
well both work just the same way really.
i have no idea why intellij doesn't auto import by default
@torn robin
Wdym
intelliJ doesnt even support native jar exports to a specified location
I need to get the time an inventory has been closed for. I have an event handler, just don't know how to get the length of there not being an inventory.
like Zahl the "import unambiguous imports automatically" is disabled by default
@idle zodiac you'd have to manually keep track of when someone closed the inventory
why exactly are you tracking it?
ok
I need to get if an inventory has been closed for over 3 ticks, then clear an arraylist
thats besides the point
ao
Well for example i disabled Star imports from IntelliJ because they're dumb
everyone should
I get the time of when it was closed, then check if it has been 4 ticks?
like it does import java.util.*; just for having used UUID once
yeah i never saw intllij wildcard import
its never done that for me
@idle zodiac is the player able to reopen the inventory?
if not you could just schedule a sync task to run 3/4 ticks after
@idle zodiac is there an InventoryCloseEvent?
there is yes
yeah it's this option
best starting schedule time on close event. then check int
simple way around it
also why just ticks? add up to seconds with 20*4 = 4 seconds
just use Map<Player, Long> @idle zodiac
and put them in the map as soon as they close the inventory
using scheduler for this is bad
what are you gonna do once they're added to the map?
i think they just want to clear the arraylist after its been closed
not necessarily once its been opened
there's not a lot of detail
Are you using Lists for contains/remove/add checks @idle zodiac
Because its not as efficient and reliable as using instants
simple method of removing or clear the arraylist would still work fine
yes, but using instants would be better
why would you use arraylist for only contains check though?
thats not what is an arraylist used for
I don't think any scheduler is required here
an arraylist is to remove and add elements so it can work like that @brisk mango but yes map would be better that way
no
arraylist is not used for that
I was talking about that, you should use a Set/HashSet when only need contains/remove/add checks
for faster checks/methods
you should use an list when you need the #get method
ig
yeah i agree, a hashset would be best for contains
iirc contains is much faster with hashsets vs lists
Remember that list can have duplicate elements, but hashset cant
Hey can somebody from staff help me? It seems like somebody has my login infos
and he downloaded plugins
ahoj larkyy
change your credentials
can I somehow search who was it?
no
like IP address or something
change password + setup TSV
theres a couple if you search up 'yaml checker'
two step verification
Do you find this syntax to be good for users editing the config?
can anybody help me with shaped recipe ? It gives me this error each time i try to craft : java Could not pass event PrepareItemCraftEvent
full error?
Why not use Bukkit.addRecipe
?paste
GnanPluginListeners.java:95
GnanPluginListeners.java:84
...
send code
class GnanPluginListeners line 95
What should i send ?
if(matrix[i] == null || !matrix[1].equals(ingredients.get(i))) {
return;
}```
So I now have a question regarding performance. I currently have a table with 4 columns. Is the proper way to work with it to cache it when the plugin starts, instead of always reading it ?
Ok, I think i'll make it a singleton object
i'll try
bruh cant you just fucking copy the stack trace and send it in a bin
geez
this is not the error?
bruh
it works perfectly, thx
there you go
ask for the error you get the startup code π
clearly you haven't, because if you did, there wouldn't be a dash at the end
yes so now give us those
probably because when you remove it, it actually starts the jvm
you didn't include the file
how do you expect it to know what its supposed to load
when you don't have a jar π
yeah, where?
in the file?
not stated
okay im done for today
then type at the and of the command -jar server.jar

@bright meadow post command
r u running the batch?
LOL
sure
didnt even test it out
and says didnt work
it was like 2 seconds
2 seconds
okay buddy youre incredible
im done for now
u removed the full command?
yeah sure its not in 1 second and have the time to respond
put the -jar at the very end
just do
java -jar server.jar nogui
no you need xms and xmx im pretty sure
java -Xms3G -Xmx3G -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=100 -XX:+DisableExplicitGC -XX:TargetSurvivorRatio=90 -XX:G1NewSizePercent=50 -XX:G1MaxNewSizePercent=80 -XX:G1MixedGCLiveThresholdPercent=35 -XX:+AlwaysPreTouch -XX:+ParallelRefProcEnabled -jar server.jar --nogui
this one works fine for me
yeah just give up
well you can remove the agentlib
@bright meadow
thats for debugging
i removed it
well you've fucked something up then cuz it works fine for me
w h a t i s t h e e r r o r m e s s a g e
if only spigot didnt make you wait 15 seconds π
add pause on the end on a new line
edit the chunk
@bright meadow add pause in new line in your batch code
well you keep saying it doesnt do shit when clearly it should do shit lmfao
dont work and not doing shit are completely different things
e r r o r ?
pause is ment to keep your window open until you press a key so you can get the error
just send the bat here
cuz you didnt add pause
just send the whole .bat file here*
pause >nul```
it isn't harder
it outputs to nul
not to put a "Touch a key to continue "
well windows defender activates on ur bat file
so i'm not activating it
what version do you running?
use 1.15.2
it runs better
most should work
try it using a backup
and
are u using spigot or paper
try optimizing paper.yml
helps a lot, most of the times
by.. well.. changing options to have other values
meh i need a new server pc
11.7 tps no players
because the dynmap is drawing shizzle
and the dynmap is a more optimized custom version
to be able to run on 2gb ram
lol
i run on 4
non
optimization fixes das
oof.
a very useful tool for diagnosing lag
Tracks what plugins and world entities are overloading TPS, ticks per %. A useful tool
Does anyone know if the recipe book can be used with a custom workbench inventory?
I have a question that isn't really answered in the documentation
when is that 'may' called. How would I know if the web request will be made or not
I think it's if the player hasn't already joined the server or isn't cached, it calls the Mojang API
Is it possible to know if a player is cached?
I don't like making web requests because the server may get blacklisted
does anyone know when PacketPlayOutEntity is sent ?
I'm not sure what to put in ps = conn.prepareStatement(); for SQLite when I want to UPDATE table_name SET variablename = ? where blockLocation = ?
Should I just create the string first using the variables and pass it into #prepareStatement()
the update table for sqlite is exactly the same as for mysql
That's what I have, but how do I do it using ?
ps = conn.prepareStatement("UPDATE " + table + " SET blockAmount" + index + " = ? WHERE blockLocation = ?");
how does shaped recipe work in 1.12.2 ?
Can I somehow contact Forums Staff?
you replace the ? with the preparedstatement's setInt setString etc
Oh since we're talking about this
I needed help exactly for parametrized queries
Where i CANNOT put the ? operator
like can I also use it for columns?
Hey, is Spigotmc website down ? It keeps saying 500, 502 and 520 Errors
For me to
@glad shale yes
Question, how do i set/get banner patterns?
again...
Nevermind, i found BannerMeta. Sorry.
is spigotmc.org down?
yes
ah okay
yeah it's having a lot of trouble lately
no
Looks up again for me
how long would it take till the ddos idiots stop/run out of money? π€
my protocol lib plugin, crashes timeout on any version above or 1.13
would i have to try and disable every listener until it doesnt or
Do you have any stacktrace ?
Nope
the only thing that works is the chat
but then you get timed out
so it doesn't crash per say
but times out the player, rare occasions times out the server
how long would it take till the ddos idiots stop/run out of money? π€
@tiny dagger
Everyone needs to stop thinking people are just casually DDOSsing random servers for absolutely no reason.
It takes a lot of very expensive resources to do such an attack. The people that are able to do it will not do it for free.
Some people actually do that (idk if this is the case now), but my servers got ddos the other day randomly (OVH mitigation is great ;D)
No one is gonna DDOS a website for just the pleasure of it.
Some people actually do that (idk if this is teh case now), but my servers got ddos the other day randomly (OVH mitigation is great ;D)
@earnest kestrel
No it didn't.
Is it possible to execute some method in main thread during async?
You might have received a notification about it but it definitely didn't.
i also love the fact that it means that all the server versions think they're outdated
Is it possible to execute some method in main thread during async?
@chrome edge schedule a sync task
My servers did haha, I checked logs and OVH notified me.
I did but that doesn't work
My servers did haha, I checked logs and OVH notified me.
@earnest kestrel it didnt.
@sick citrus more sad is that new DDoS attacks got more advanced
dude there are alot of ddosing going on rn
Why are there 2 bukkit runnable in spigot library?
as you need only some bucks to do it
Alright @sick citrus this is ridiculous
I receive tons of those notifications with just normal traficm
it can happen at any time on anything..
kids tend to go jelous so they spend 5$ to ddos you for some time..
@sick citrus May you give an example code? I've tried what you said but I didn't get work it. -_-
Let me tell you it wasn't normal traffic, I know when I get DDoS @sick citrus
You're wrong.
wtf alright
@sick citrus May you give an example code? I've tried what you said but I didn't get work it. -_-
It will if you do it priperkym5
Properly
Should sync task run in main thread? The code works but code which needs main thread doesn't execute without any error.
I'm trying to spawn a packet entity in sync during async. I've to check some datas on background and spawn entities.
//ASYNC CODE
Bukkit.getScheduler().runTask(X.plugin, () -> {
//spawn entit code
});
});```
Am I doing something wrong?
thats honestly fine
I've never used bukkit scheduler before. If I made a mistake please explain me where I made.
It works but entity doesn't spawn
Your entity spawn code most likely is wrong somewhere then.
can you share that?
Wrong as in maybe a bad location
the eaisest way to see if it works is to Bukkit.getLogger.info()
if it's called then you know something's wrong with your spawn code.
bukkit.getlogger π³
either plugin.getLogger or System.out lol
Aaaand idiots.
smh
or Bukkit.getConsoleSender().sendMessage() or Bukkit.broadcastMessage()
both of them work even better ^
mh
I'm not idiot. I've already tested several times with debug comes.
And what's the result ?
It's that your code doesn't work, so there's definitely something you're doing wrong.
No.
Interesting. I'll try to understand how it works. Thank you for your helping.
I don't understand what's so confidential about your code that you don't want to share it.
just share your code lol
It doesn't needed. I just said everything.
:S
well if you said everything, obviously it won't work
because your sync task just contains a comment.
and I do not care code. I just want to learn how it works and you guys told me to use correctly
So there's no problem. Thanks again
whatre we talking bout
Somewhere.
is 1.13.2 bad for performance; server wise
I've never had a server run better than when I switched to 1.15
and client-wise it's the same
one server?
One server. One machine.
I mean 120 ppl in the same realm?
On the same machine, playing the same game, in two different bukkit worlds
no bungeecord, just one Paper server
and it has consistent TPS
The machine is quite beefy, granted
it wouldn't run on a basic i7 with 16g of ram
interesting lol, had many ppl complaing about it
Because most server owners are cheap arses who expect their server to hold 500 players by paying 10$ a month.
On a VPS.
i am not talking about that kind of server owners lol
dont make assumptions
Wow I didn't know packets can use in async...
I realised why it started to timeout the servers above 1.12 :( it was actually my loc utils
It would take 600ms per position packet
I've got it down to 13ms
that sounds like a big improvement congrats
1.8 has less features therefore less things out carry out at a time i am guessing
How do i use the TabCompleter in Bungeecord? My code here seems to do nothing: ```public class helpListener implements Listener {
@EventHandler
public List<String> onTabComplete (CommandSender sender, Command command, String alias, String[] args){
List<String> list = new ArrayList<>();
if(args.length == 0) {
list.add("string");
}
return list;
}
}
And yes i already registered the Listener: getProxy().getPluginManager().registerListener(this, new helpListener());
onTabComplete is not an event
you need to implement TabCompletor (completer?)
and override that method
and in the onEnable
setTabCompleter to that class
the same way you'd do with a CommandExecutor
protip : if your method takes one argument whose class name ends with "Event", it's probably an event. Otherwise, it most certainly won't be
oh sorry bungeecord
It's still not a listener
pretty sure in bungee
it's extends Command implemennts TabExecutor
and returns a public Iterable<String> rather than a list<String>
ok i will try that
public Iterable<String> onTabComplete(CommandSender sender, String[] args) {```
I believe
it's been a long time since I did bungee stuff
sorry if I'm wrong
also getProxy().getPLuginManager().registerCommand()
iirc
i should register a TabExecutor as a command?
I'm not 100% sure sorry
Someone please help me fix this https://www.spigotmc.org/threads/weird-movement-happening-in-minecraft.439137/#post-3808854
...you mean disable the view bobbing ?
What do you mean
the setting in all minecraft clients ?
Where
...
Iβve never heard of view bobbing
i don't know one person who doesn't disable view bobbing
It makes your view bob side to side while walking
Also known as: the worst option set enabled by default
I never did and never really intend to
I used to play with that constantly
new BukkitRunnable() {
int count = 0;
@Override
public void run() {
Bukkit.broadcastMessage("Damaging " + damager.getName() + " for " + damage + " ( count = " + count + " )");
damager.damage(damage, damager);
count++;
if (count >= times) {
cancel();
}
}
}.runTaskTimer(getInstance(), 2L, 2);
Any reason this does no damage
ahh, a repeating task
it should do damage
use proper debug logging with logging levels
it does not
use proper debugging isn't going to fix this
who is damager?
avrovulcan
good point
whatever you do though do not use Bukkit.broadcastMessage to debug ;-;
i'm testing some enchants on a dev server
before i push them to a live server
still does not damage
Ah yes
Good old println Debugging
The worst kind of debugging
I wonder how ppl waste their time on creating actual debuggers when sout is a thing
using breakpoints wont help me fix this lmao
damager.damage doesn't damage don't see how a breakpoint fixes that
You can dive in and see why?
you can reset if you have the audacity to spend more than 30 seconds at a breakpoint π
but things tend to run on the main thread
Hi everyone, I'm looking to upgrade my server to 1.15.2 and I'm wondering how to determine which version is the most stable. Should I run my own tests or do you have a way to deduce this?
Last time I updated there were lots of problems with plugins crashing and the server lagging that eventually got fixed, so I've held off on upgrading to 1.15.2 when it came out. Is there a way to do better than just trail-and-error?
trial and error sounds like the best
plugin devs sometimes put whether or not its tested on the plugin page
which version is the most stable?
wdym
BuildTools will only give you the latest version, and its always stable
1.15 just doesnt have as great of performance in general, but thats not really because its unstable, just the fact of how minecraft has evolved
Someone help me develop my server please I'm looking for a dev please help me dm me if your interested
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
there u go
(i was calling not cafebabe stupid)
(that mayve came off differently lol)
so, BuildTools.jar is the jar to go to use Spigot then? π
its how you get spigot
thank you sir, i was confused for a second ^^
Thanks @wanton delta. I'll go run some tests myself, then π
I'm only using three plugins, one of which is my own, so it should not be that much work. I was just wondering if there were specific builds of Spigot to avoid.
where can i buy mcmmo?
Do any of you guys know whether or not I could create custom entities with resource packs on spigot without replacing another entity?
How can i autofill the chat writing box of a player?
do you mean when you press tab?
@wanton delta No by clicking text in the chat.
When i click "/command args" it appears in the writing box.
uhmm
i,m kinda a noob but i download the source code ?
for mcmmo
i tought you needed yo pay for it.
You want to compile the jar yourself?
Self compiled versions are not tested. They might contain issues.
But can i buy mcmmo somewhere
You can buy it on spigotmc.org
@wanton delta is the action i need SUGGEST_COMMAND?
yes
ok thx
What would be the best way to go about having a proxy talk with a server and or is there something better than a SocketServer
something like redis?
mostly trying to avoid using plugin messages
i think youre looking for redis
But wouldn't that require a specific server or am I thinking about it wrong?
you would need to have a redis server correct
but its just something that runs in the background
its not like a spigot server or bungee proxy
cause were using minecraft server hosts until we buy ourselves an actual server
you think a socket server would be alright at least for now
i personally dont have experience with that
i dont know why youre avoiding plugin messages?
the requirement to have a player on the server you want mostly
we dont support version protocols
but the most common direction would be with ViaVersion/ViaBackwards
can someone help me with this https://www.spigotmc.org/threads/minecraft-clear-special-items.439201/
Like i said, we dont support version protocols so youre asking the wrong people
I think theres a line somewhere in bungeecords configs that states the info
it looks like probably in your case its in bungeecord.yml
@patent bay are you using DispatchCommand?
@frigid ember this post should help you: https://www.spigotmc.org/threads/how-to-change-version-name.34121/#post-394835
I think you need the Protocol Lib version for Bungeecord: https://www.spigotmc.org/resources/protocolize-protocollib-for-bungeecord-waterfall.63778/
I think you dont need Protocol Lib if you are using Waterfall.
You can directly set the version in the waterfall.yml file
any help with this people: https://www.spigotmc.org/threads/minecraft-clear-special-items.439201/
help
my grass
do not expand
randomtickspeed is on 1000 and still does not work
other plants are extremly fast
@patent bay I tested the very last one it the list that you said failed and that one work fine on my end
paste me the commands u used?
/give Colink02 prismarine_shard{display:{Name:"[{\"text\":\"β Rare Gem β\",\"italic\":false,\"color\":\"dark_gray\",\"bold\":true}]"},Enchantments:[{id:"vanishing_curse",lvl:1}]}
/clear Colink02 minecraft:prismarine_shard{display:{Name:"[{\"text\":\"β Rare Gem β\",\"italic\":false,\"color\":\"dark_gray\",\"bold\":true}]"}}```
are you sure ur running basic mc with no plugins affecting it? it says no items found for when i do it on the console and i'm using latest spigot version
Does anybody know how to download a server's resource pack? Like not how to download it ONTO a server but to physically download a server's resource pack. There's a folder in .minecraft called server-resource-pack but they aren't .zip files they're just blank files.
Those are cached files
if you just rename it and add .zip it will open like a normal zip file just make sure your extensions are on
@wet bronze
@patent bay Just tested it in singleplayer and works fine
thanks @tall crystal i just had to add minecraft: to the start of the commands , must of had an interferring plugin then. The below works now:
minecraft:clear chris_61 minecraft:prismarine_shard{display:{Name:"[{\"text\":\"β Rare Gem β\",\"italic\":false,\"color\":\"dark_gray\",\"bold\":true}]"}} 30```
hmm interesting
essentials give
essentials is annoying... I wrote my own plugin just for that reason xD tired of all commands being overrided
yeah essentials is really annoying when you're used to the default mc commands
like tp
yeah
is there some kind of prioirty to premium resources being approved? I'm seeing premium resources being approved that were first uploaded yesterday, but mine that was uploaded wednesday hasnt been approved
my motivation to write plugins was to avoid essentials
Well that's a +
is spigot down ? i keep getting this error
not for me
yeah its not
oof
how tf can you send images
Does 1.13+ do everything async or something
No FatalPacket
So i have a banner as an ItemStack, how do i turn this into a block? A banner block that is placed?
Meaning colors and patterns would be carried over from the ItemStack, but how do i do that?
I think if you can set a block in the world as banner, can you cast that block to a banner?
then set their meta?
get the state of the block and cast it to banner @worthy lava
Hey, I am currently trying to make a pvp bot, and for that I created an entity player. It moves, it triggers entity damage events and works perfectly. The only problem i have (and can't solve) is, that I can't add velocity to the npc, as it weirdly doesnt get velocity in the EntityDamageByEntityEvent. What i tried: getting the bucket entity and setting its velocity; setting velocity changed to true and motX, Y, Z to the vectors values. Results: No errors - no movement. Thanks in advance
How do I stop this map from flickering? https://www.youtube.com/watch?v=5Di4KadXwcM&feature=youtu.be
for (int i = 0; i < worldMap.colors.length; i++) {
worldMap.colors[i] = 0;
}
worldMap.decorations.clear();
map.setWorld(player.getWorld());
map.setCenterX(player.getLocation().getBlockX());
map.setCenterZ(player.getLocation().getBlockZ());
if (player.getItemInHand().getType() == Material.MAP
&& player.getItemInHand().getDurability() == map.getId()) {// update cursors
worldMap.a(((CraftPlayer) player).getHandle(), CraftItemStack.asNMSCopy(player.getItemInHand()));
}
Items.FILLED_MAP.a(((CraftWorld) map.getWorld()).getHandle(), ((CraftPlayer) player).getHandle(),
worldMap);// more efficient than the updater (shows the area around the player only, not
// all loaded chunks)
// mapUpdater.update(map);
super.render(map, canvas, player);
@bronze marten Set their meta? Explain
Im trying to get meta of an banner item, and set that data to a banner block
Ik how to cast it and such. I have already done that.
it has setBaseColor, setPatterns
So i set the basecolor and setpattern from the item meta
yeah
base colour is deprecated
all banners have their own type
Patterns and what not, however, are done on BannerMeta, yes
yeah BLUE_BANNER etc
I love how the map decoration constants are all named differently than vanilla/wiki
Wait no i got it
Could PacketPlayOutSpawnEntityLiving spawn same id entities?
How do I make a map without putting it in the worlds folder?
I've never seen this before. When I spawn 10 entities per tick, some of them have same id as one of them...
So it may be buggy?
when is PacketPlayOutEntity sent ?
make a new File Directory @frigid ember
It's not buggy, your code would be buggy
I just use packet to spawn entity. I don't use any reflection even
EntityLiving entity = (EntityLiving) EntityTypes.a(this.entityType, world);
entity.setPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
DataWatcher watcher = entity.getDataWatcher();
watcher.watch(4, (byte)0);
this.ENTITY = entity;
PacketUtil.sendPacket(this.viewers, new PacketPlayOutSpawnEntityLiving(entity));
PacketUtil.sendPacket(this.viewers, new PacketPlayOutEntityMetadata(entity.getId(), watcher, false));
((CraftWorld) this.location.getWorld()).getHandle().makeSound(this.ENTITY, getSaySoundEffect(), 0.5F, 1F);```
@hoary parcel Is there any mistake that causing ID duplication?
Does that spawn method actually assign a I'd?
No, there isn't any method based on ID but I have delete method which needs ID of entity.
PacketUtil.sendPacket(this.viewers, new PacketPlayOutEntityDestroy(this.entityIDs));
No I mean the nms method you use to create the entity
I still don't get it how do i put patterns on a banner block
Via the meta wiebe
BannerMeta, how do i get that from the banner block
List<Pattern> patterns = new ArrayList<>();
patterns.add(new Pattern(DyeColor.BROWN, PatternType.STRIPE_CENTER));
patterns.add(new Pattern(DyeColor.LIME, PatternType.FLOWER));
patterns.add(new Pattern(DyeColor.BROWN, PatternType.SKULL));
patterns.add(new Pattern(DyeColor.GREEN, PatternType.TRIANGLE_TOP));
patterns.add(new Pattern(DyeColor.BROWN, PatternType.STRIPE_DOWNLEFT));
patterns.add(new Pattern(DyeColor.BLUE, PatternType.BORDER));
patterns.add(new Pattern(DyeColor.GREEN, PatternType.SQUARE_TOP_LEFT));
patterns.add(new Pattern(DyeColor.GREEN, PatternType.SQUARE_TOP_RIGHT));
patterns.add(new Pattern(DyeColor.BLUE, PatternType.CURLY_BORDER));
patterns.add(new Pattern(DyeColor.BLACK, PatternType.GRADIENT_UP));
banner.setPatterns(patterns);```
What is it BlockData or MaterialData
As I understood you're trying to add pattern to banner block in a world
I am stupid man, sorry lads.
Banner banner = (Banner) location.getBlock().getState();
Banner bannerData = (org.bukkit.material.Banner) banner.getData();
bannerData.setFacingDirection(yawToFace(-location.getYaw()));
banner.setData(bannerData);
banner.setBaseColor(DyeColor.LIGHT_BLUE);
List<Pattern> patterns = new ArrayList<>();
patterns.add(new Pattern(DyeColor.WHITE, PatternType.TRIANGLE_BOTTOM));
patterns.add(new Pattern(DyeColor.ORANGE, PatternType.BORDER));
patterns.add(new Pattern(DyeColor.BLACK, PatternType.FLOWER));
patterns.add(new Pattern(DyeColor.GRAY, PatternType.CIRCLE_MIDDLE));
patterns.add(new Pattern(DyeColor.GRAY, PatternType.SKULL));
patterns.add(new Pattern(DyeColor.ORANGE, PatternType.TRIANGLE_TOP));
banner.setPatterns(patterns);
banner.update();```
You've to update block state too
Just use this and try to figure out how it works
Be careful. Spigot and vanilla have different pattern names
this is weird but it's okay
I got it mate, finally got my capture point system done, many thanks!
I'm going to go for a run and will set you up with a new domain when I get back
SOMEONE HELP ME PLEASE
Oh shit. I couldn't find any solution for this stupid thing. Some of packet entities have same ids. -_- nvm I'll just use slower maybe may work.
hey guys
Getting this error: https://hastebin.com/mizovulixi.css
this is my main: https://hastebin.com/yixubonoki.java
this is my command: https://hastebin.com/cepurowofa.java
and this is my enchant: https://hastebin.com/bulosiruja.java
I have debugged and i have no clue what this error means, have never got it before and yes before you say, i have googled it, thanks for the help in advanced
//Commands
new SpeedBootsCommand(this);
//Enchantments
new SpeedBootsCommand(this);
This is your error, the command will try to register twice
Banner bannerData = (org.bukkit.material.Banner) banner.getData();
(org.bukkit.material is deprecated)
Is there a way to try and reduce a JAR size?
I currently have written about 105KB of code, but all the dependencies make it get to 5.3MB
is that an issue I should not worry about?
MySQL, Hikari, Commodore, PostreSQL, H2
SQL is not necessary, driver is shaded into the server
which one?
So that saves you one dependency. Though really, what I advise doing is downloading PostreSQL and H2 when required and loading them up at runtime
Or whatever ones aren't your default schema
wanting to release a resource on 'premium' but its not enabled/clickable to access add resource type
Commodore and Hikari will likely have to remain shaded into a mega jar which is fine. Though really, those can be downloaded and loaded onto the classpath as well if you really wanted to
I mean I know how to download stuff, but I wouldn't know how to load a driver class I've just download
iirc, you can do it using your plugin's classloader
kool
It's available at runtime. I can assure you of that
any input on how to get premium resources enabled Choco?
CraftBukkit:
(note not a Bukkit dependency, it's internal)
Syxteen we have minimum requirements
?premium
Class.forName("com.mysql.jdbc.Driver");
would be an option?
Yes. That will force it to be loaded
//Commands new SpeedBootsCommand(this); //Enchantments new SpeedBootsCommand(this);This is your error, the command will try to register twice
@frigid ember thank you, lol after 2 hrs of debugging and I didnβt find that
This is why we don't do things in the constructor
Hey, I am currently trying to set an EntityPlayers velocity. I tried to getBukkitEntity#setVelocity, but that didn't work for me. Thanks in advance
Player#setVelocity
Google i> Hey, I am currently trying to set an EntityPlayers velocity. I tried to getBukkitEntity#setVelocity, but that didn't work for me. Thanks in advance
@fluid garden# google it I found it first try lol
Wtf happened there
didnt work
If you mean this
entityPlayer.velocityChanged = true;
entityPlayer.motX = x;
entityPlayer.motY = y;
entityPlayer.motZ = z;
why whats up @frigid ember ?
Constructor is not used for calling method, because the work in the constructor is bad, its should be using for constructing objects and not doing any work in it. Private methods are usually fine though iirc. Overriden methods should never be called from any constructor since you can run into some weird issues, the method can get called before the class's constructor if its an overriden method. @oak stump
Yeah, I just explained him a couple reasons why u shouldnt do it choco
Just don't do it 
yeah, its bad, and as ive seen
i have started using spigot and my zombie pigman farm has lost a lot of efficiency, can anyone provide some insight why
@frigid ember if there isn't DeluxeMenus is a shot, if it support papi=placeholderapi
like as opposed to using vanilla jar
@brisk mango this is the weird part. it doesnt work
I dont know what does mean "it doesnt work"
nothing happens no errors no velocity applied
in the damage event: e.getEntity().setVelocity(new Vector(1, 1, 1)); 2. Try: entityPlayer.velocityChanged = true;
entityPlayer.motX = 1;
entityPlayer.motY = 1;
entityPlayer.motZ = 1; 3. Try: entityPlayer.getBukkitEntity().setVelocity(new Vector(1, 1, 1));
event.getEntity().setVelocity(new Vector(x, y, z));
should work, check if is ur event registered
yes it is
also, dont name your variables with just 1 letter. Theres a couple reasons for is
@brisk mango ikr. But to shorten my message i shortened it π
Hey guys, how do I get a location from a pixel on a map
@fluid garden send whole class, also how do you know its registered
because i am logging my methods.
as event i always do 'e' shorter, makes my life easier.
yes added you
ayy what i can get away with i'll do so π
I mean if you follow this rule then you will have really shit codes
so you would do anything that works; no matter if its a bad practice or not
just for shorting onMove(PlayerMoveEvent event(to "e")), its not the end of the world
no not in this case, but as i say in general you shouldnt really follow this rule
oh only in EventHandlers i do that
Single-letter variable names are horrendous
i would like a word
e is beautiful to me
But e is used for element in generic for loop
K, V
Hey guys, I found this to help me out
IBlockData data = nmsWorld.getType(block);
MaterialMapColor color = data.a((IBlockAccess) nmsWorld,
new BlockPosition.MutableBlockPosition());
canvas.setPixel(x, y, (byte) (color.ad * 4));
but I don't know what the color.ad and data.a is for 1.8
Can someone help me? I use this code for my /help command, "/help" works, but "/help general" only outputs the pre and suffix : ``` public void execute(CommandSender commandSender, String[] args) {
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
commandSender.sendMessage(new ComponentBuilder(main.getPrefix()).create());
if (args.length == 0) {
commandSender.sendMessage(new ComponentBuilder("Use /rules to see the rules.").color(ChatColor.GREEN).create());
commandSender.sendMessage(new ComponentBuilder("Use /lobby to get back.").color(ChatColor.GREEN).create());
commandSender.sendMessage(new ComponentBuilder("Use /dicord to get the invitation link.").color(ChatColor.GREEN).create());
} else {
if(args[1] == "general") {
commandSender.sendMessage( new ComponentBuilder( "Use " )
.append("/help general").event( new ClickEvent( ClickEvent.Action.SUGGEST_COMMAND, "/help general" ))
.event( new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder( "Click this to put it in your text box." ).create()))
.append(" to see all general commands.").create());
}
}
commandSender.sendMessage(new ComponentBuilder(main.getSufix()).create());
}```
oh dear
this is some real shit code
never compare strings using == because new String could be called twice
and its because array index starts from 0 not 1
That as well, yep
Compare String contents with .equals()
@subtle blade ok thx. I dont know why i didnt think of that.
and its because array index starts from
0not 1
@brisk mango yh your right
Also, just so you're aware, Bukkit's help command is configurable using the help.yml so you can create custom categories and whatnot
Whether or not it supports text components, I'm unsure if Spigot improves that
Also, just so you're aware, Bukkit's help command is configurable using the help.yml so you can create custom categories and whatnot
@subtle blade I plan to make my command hover and clickable. Works that too?
I'm unsure if Spigot improves that
using the chat component api.
using the chat component api.
@brisk mango the api works in help.yml?
I'm unsure if Spigot improves that
I think i will keep my code. thx for the help
how fast is string.equals tho? π€
What a dumb question
no it's not
It is a fucking dumb question
why would you care about how fast it is
when in speed, there is almost likely no difference between .equals and ==
bruh these people
(especially when == won't work 99% of the time)
is guava reliable and efficient?
because i'm pretty sure if the ez checks fails it goes into checking every char by each
is comparing strings with .equals good enough? or should i use ==
Of course it does ;P It's checking the contents of the String
It will halt if at any point they are not equivalent
@tiny dagger it checks the reference, and then length, and then iterates characters from the start
Some things are unavoidable. If you want to ensure the equality of something you have to actually check its contents
In this case, character by character. That is what defines the equality of one string of text to another
might be worth considering string interning if you have a constant string that you compare with frequently
For commands it doesn't seem all too necessary
yeah definitely not
Since nobody seems to know how to give velocity to an EntityPlayer, I wanted to ask if someone has a better idea to spawn a fake player who should be able to get knockback. If there is a way to set velocity through packets, please let me know. Thanks in advance π
Not a time-dependent operation, really. Would be a micro-optimization
im sure u can do it with a packet, but cant remember its name @fluid garden
or does not EntityPlayer have a setVelocity method?
tried PacketPlayOutEntityVelocity but i can't figure out how it works
no it doesnt.
It does
sure? My spigot (1.8) doesn't give me the option to setVelocity
I mean...
You're on 1.8. You can't expect everything we say to be accurate to 5 year old software
Please. I want my server to be available for all versions (1.8 and up). So i have to get it to work in 1.8 thanks anyway
1.8.8 better
viaversion is shit
Major versions no less
1.8.8 or 1.12 is the way to go for servers
i am using 1.8.8
u cant expect everything to work properly if u have 1.8-1.15 server
im only testing on 1.8 first
even if you have viaversion, thats just really shit plugin
i never said something about via versions
woah that really is 8 versions to 1.8
it can be
i mean, 0.68 tps is quite low
lets be honest, nearly all big servers are running on 1.8 so i dont know whats the problem
lmao guess he doesnt know what viabackwards does
no i dont think so. its way easier to keep it all in the lowest version and update to newer versions.
@fluid garden Grab the CraftPlayer object from that with EntityPlayer#getBukkitEntity() and use Player#setVelocity, works for me
it might be but your argument was completely incorrect
most major servers are 1.15 and support backwards
not the other way around
that doesnt mean they run 1.8
merely that they support it
@cloud crater first - thanks for not being rude or trying to know everything better. I tried it already, but didnt work for me sorry. Could you show me your code?
I mean, supportning more versions than 1 at the time is really a bad idea, because the packets on other versions can be different than the ones that you have in your current version. Also you have to deal with abstraction/reflection shit
abstraction really isnt that bad with modules
wait are you really trying to do a 1.8 - 1.15 server?
i do wish you the best of luck with support
in bungeecord, I should get the Username from handshake by getConnection().getName right?
its not that hard its really easy but if you never did something else than programming on a stupid minecraft library than i feel sad for all of you so please calm down and stop crying about me doing stuff that is "imposible" for you. I know what i am doing, and you cant stop me anyway.
@fluid garden what you using the volocity for?
@fluid garden bruh could you read my message
I say you cant do a 1.8-1.15 since the packets are different
in every version
good luck then
"its not that hard"
I know what i am doing, and you cant stop me anyway.
Use whatever you'd like. We will not stop you. However, we will not support you. You are running a 5 year old version of the game while using an unsupported protocol hack
I doubt that you can make something more with packets if you dont know how to set a velocity to an EntityPlayer
Do not expect support whatsoever
We advise you update to the latest version
If it's 1.14 or below we do not give support
Protocol hacks are already pretty dangerous
At least not officially
Community members on the other hand may support it if they'd like, that's on a per-user basis. Though as far as Spigot is concerned, no support, no bug fixes, nothing
I've gotten screwed over by vulnerabilities in them and now I refuse to use them
msws have u found some way to add 1.6.4 support to nbt editor?
im disappointed they didnt add it
1.6, best version
If it were up to me, I'd lock any thread that isn't the latest version π
Would be great to handle things the way Forge does
ok getconnection.getuuid and getname show both null lol
choco whats the earliest version of spigot

That's what I do in my plugin support, we only support the last 4 minecraft versions. If you come into the channel using anything else you get resolved which means we reopen the channel for a new q
however getVersion and isOnlineMode seems to work
Yet people STILL come for 1.7
I support minimum what I use and that's how Bukkit was designed to be used
If I used NamespacedKeys, I'm supporting 1.11+
If I use BoundingBoxes, I'm supporting 1.14+
were the rayTraceBlock methods for players added in 1.14 then?
iirc, 1.13
i think people just never got used to mojang actually updating mc
we got so used to 1.8 for so long
Lol
No, people are just too stubborn and unwilling to adapt to change
So I say fuck 'em
They've had no incentive to update because plugins continue to support them
it's also the devs fault (including me) for supporting it too
I mean, some people dont like the newer versions @subtle blade
how about pvp servers?
there is oldcombatmechanics
oh okay so u expect pvp servers to be on 1.15
1.9 PvP opened the doors to so many avenues of PvP
bruh who would play pvp with old combat mechanics
Someone asked us to backport our core rewrite to 1.7.10 (we used 1.13 as an excuse to rewrite a lot of stuff and fix it so now it's an essentially new plugin)
From a developers point of view, if you're not using something that has what I need, you're on your own and you can find an alternative
Then got mad at us
coulda sword there are like 50 plugins out there that revert the pvp back to 1.8 style
My stuff is open sourced, downgrade yourself
When we said no
I'm not doing it
@torn robin still it wouldnt be as good as 1.8.8 client pvp
perhaps
like server-sided plugins wouldnt really help it
but are you really gonna stick to 1.8 for the rest of MC?
no
https://www.youtube.com/watch?v=31V6ifW3tNk 6:48 how the pvp is in 1.8.8
depends who you ask lol
gonna create my own
there is a reason why a lot of people stop at 1.12.2 π
because they don't understand how significantly beneficial the 1.13 update was?
Yea
Was a bummer
well
the code is actually even more shit
well two reasons then
ive had a look through it
Want to rewrite it yourself, temedy?
why not
no it's not lol
Please. Be my guest
1.13 is amazing
The new blocks alone add a lot of building potential
well, it actually always has been shit
Minecraft java edition
the code of minecraft
some random discord user > 60+ dev team
method calls from every constructor, stuff unorganized etc
Everyone thinks they can do better and if you believe that's the case, make like the Glowstone people and do it yourself
They're still catching up
public boolean isCollided(Location l, String string) {
/* Being requested when teleporting? */
if (l != null) {
for (double x = -0.4; x < 0.4; x += .1) {
for (double y = -0.9; y < 0.5; y += .2) {
for (double z = -0.4; z < 0.4; z += .1) {
if (l.clone().add(x, y, z).getBlock().getType().name().contains(string)) {
return true;
}
}
}
}
}
return false;
}``` how would I put that in a async runnable
What ever happened to glow
:D
They're still chugging along
Thread thread = new Thread(() -> {
});
Just not 1:1
not everyone has java 7+ π
@frigid ember
just simply create a thread
so literally threads and not schedulers?
or use ScheduledExecutorService or ExecutorService
please don't suggest that lol
why not
there are many other things wrong with what he's doing
what is wrong with using java's executors
throwing in a new thread every time it's called is not the solution
Magic values, comparing Material constants' names with Strings, hundreds of location cloning
Only need one location, create constants, compare Material constants, etc.
Actually, you literally don't even need to be as precise as you're being right now
You're checking block type. Block type will only ever change every 1 coordinate
Iterating every 0.1 and on every axis is so unnecessarily overkill it hurts
a 0.8x1.4x0.8 bounding box only needs to check 16 blocks at most
