-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix log4j2.xml packages * add new file to .gitignore * The server opens an interfaces to make the server visible * fix shutdown server * get player skin for ClientChainData * add dependendy com.google.guava * ProtocolInfo.getPacket(int protocol) for compare player protocol and server protocol * Init ChainData * add new function * Enable server connection * feat(readme): small readme update added the image of the sculk block + renamed the project in Sculk and not in Sculk-MP, giving it the pmmp aspet * feat(readme): update logo png * fix(log4j2): error using log4j2 which caused an error in the launch console + style update which will be a bit more compact * feat(Sculk): update file to remove System.out which returns the same thing as log.info + use Code-Name * add(Sculk): a runner for Sculk to make it more practical * Update log4j2.xml * add event system * fix text * import aikar timings * fix co.aikar.timings * fix login * add getScheduler() function * Adding thread backup * Create player interface for player.class * Timings.java fix * add events * add AsyncTask system * fix LoginData & PacketHandler * Update Server.java * feat(vscode): delete unnecessary vscode files * Bump com.nimbusds:nimbus-jose-jwt from 9.10.1 to 9.37.2 Bumps [com.nimbusds:nimbus-jose-jwt](https://bitbucket.org/connect2id/nimbus-jose-jwt) from 9.10.1 to 9.37.2. - [Changelog](https://bitbucket.org/connect2id/nimbus-jose-jwt/src/master/CHANGELOG.txt) - [Commits](https://bitbucket.org/connect2id/nimbus-jose-jwt/branches/compare/9.37.2..9.10.1) --- updated-dependencies: - dependency-name: com.nimbusds:nimbus-jose-jwt dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * Create publish.yml * Update build.yml (#11) * fix build and add post artifact on Action * feat(colors): new minecraft colors added (#14) * fix(server): modify server folder (#15) * style(file header): Sculk-MP -> Sculk (#17) * feat(server-properties): Creation of ServerProperties System (#18) * feat(server-properties): creation of a ServerProperties system with enums * feat(server-properties): delete "on" and "off" * feat(server-properties): add "SPAWN_ANIMALS" and "SPAWN_MONSTERS" * Readme Update (#20) * style(Update badges with sculk colors + add contributors below): * feat: edit badge color * feat: edit SculkMP -> Sculk * fix server ip and port * Update Timings.java * login send, next step world for login * Update form milestone in readme * Implement Forms (#21) * impl: form sending logic * impl: Form response handling * Add Getters for CustomResponse * Tried to reduce code complexity * Player: give formId a default value * Add consumers * Add license headers * impl: Code for PacketHandler * Rename method name * Update LoginData & Bedrock Interface * Fix async task collect * add packet connection * feat: Base plugin + plugin manager (#22) * fix string in PluginLoader * (In dev) LoginPacketHandler JWT * Update README.md * Update README.md * rename all fire function (Event) -> call * Update handler and fix resources pack loading Co-Authored-By: AzaleeX <[email protected]> Co-Authored-By: Sensei Tarzan <[email protected]> * Create spawn response packet Co-Authored-By: Sensei Tarzan <[email protected]> * login Success * Create attribute * Create hunger attribute * generate Human file and extends * Add new event (PlayerExhaustEvent) * send player attributes * Implement plugin api version check (#23) * feat: Base plugin + plugin manager * Try to reduce complexity * feat: plugin api version check * comment unfinished line of code --------- Co-authored-by: PleaseInsertNameHere <[email protected]> * Attribute (#24) * Add experience attribute * init hungerManager and experienceManager to function initEntity() * Define default EntityFlag.BREATHING true (#25) * Add experience attribute * init hungerManager and experienceManager to function initEntity() * Define default EntityFlag.BREATHING true * 🔀 Add support chat and command integration (#26) * add onUpdate() and call PlayerChatEvent.java * Player login console information * add ChatFormatter/StandardChatFormatter for PlayerChatEvent * move player class * Update Player::onChat() * Change BedrockServerSession -> SculkServerSession * Base logic command * Sends message to the console when players are typing in chat * Creation of the command system and version command * register command and add Server::dispatchCommand() * Add support Json message Co-Authored-By: Sensei Tarzan <[email protected]> * add CommandRequestPacket * add Player::sendAnnouncement Player::sendWhisperPlayer::sendMessageTranslationPlayer::sendMessageSystem Co-Authored-By: Sensei Tarzan <[email protected]> * Add version command * Fix display translation message Co-Authored-By: Sensei Tarzan <[email protected]> * Fix command data Co-Authored-By: Sensei Tarzan <[email protected]> * Add execute command in console Co-Authored-By: Sensei Tarzan <[email protected]> --------- Co-authored-by: Sensei Tarzan <[email protected]> * feat(submotd): Add `getSubMotd` method and fix level name retrieval (#27) * feat(submotd): added getSubMotd * fix: Correction of the world name on the startgame package --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: JblusItsMe <[email protected]> Co-authored-by: JblusItsMe <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sensei Tarzan <[email protected]> Co-authored-by: PleaseInsertNameHere <[email protected]> Co-authored-by: KeksDev <[email protected]> Co-authored-by: Sensei Tarzan <[email protected]>
- Loading branch information
1 parent
772e6c5
commit 7ffdb77
Showing
142 changed files
with
9,427 additions
and
281 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Maven Package | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml | ||
settings-path: ${{ github.workspace }} # location for the settings.xml file | ||
|
||
- name: Build with Maven | ||
run: mvn -B package --file pom.xml | ||
|
||
- name: Publish to GitHub Packages Apache Maven | ||
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Sculk" type="Application" factoryName="Application" nameIsGenerated="true"> | ||
<option name="MAIN_CLASS_NAME" value="org.sculk.Sculk" /> | ||
<module name="Sculk" /> | ||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/.run" /> | ||
<extension name="coverage"> | ||
<pattern> | ||
<option name="PATTERN" value="org.sculk.player.*" /> | ||
<option name="ENABLED" value="true" /> | ||
</pattern> | ||
</extension> | ||
<method v="2"> | ||
<option name="Make" enabled="true" /> | ||
</method> | ||
</configuration> | ||
</component> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<module version="4"> | ||
<component name="AdditionalModuleElements"> | ||
<content url="file://$MODULE_DIR$" dumb="true"> | ||
<excludeFolder url="file://$MODULE_DIR$/.run/logs" /> | ||
<excludeFolder url="file://$MODULE_DIR$/.run/players" /> | ||
<excludeFolder url="file://$MODULE_DIR$/.run/plugin_data" /> | ||
<excludeFolder url="file://$MODULE_DIR$/.run/plugins" /> | ||
<excludeFolder url="file://$MODULE_DIR$/.run/resource_packs" /> | ||
<excludeFolder url="file://$MODULE_DIR$/.run/worlds" /> | ||
<excludeFolder url="file://$MODULE_DIR$/.run/banned-ip.txt" /> | ||
<excludeFolder url="file://$MODULE_DIR$/.run/banned-players.txt" /> | ||
<excludeFolder url="file://$MODULE_DIR$/.run/op.txt" /> | ||
<excludeFolder url="file://$MODULE_DIR$/.run/sculk.yml" /> | ||
<excludeFolder url="file://$MODULE_DIR$/.run/server.properties" /> | ||
<excludeFolder url="file://$MODULE_DIR$/.run/whitelist.txt" /> | ||
</content> | ||
</component> | ||
</module> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 108 additions & 0 deletions
108
src/main/java/co/aikar/timings/FullServerTickTiming.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
/* | ||
* This file is licensed under the MIT License (MIT). | ||
* | ||
* Copyright (c) 2014 Daniel Ennis <http://aikar.co> | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
package co.aikar.timings; | ||
|
||
import static co.aikar.timings.TimingIdentifier.DEFAULT_GROUP; | ||
import static co.aikar.timings.TimingsManager.*; | ||
|
||
public class FullServerTickTiming extends Timing { | ||
private static final TimingIdentifier IDENTIFIER = new TimingIdentifier(DEFAULT_GROUP.name, "Full Server Tick", null); | ||
final TimingData minuteData; | ||
double avgFreeMemory = -1D; | ||
double avgUsedMemory = -1D; | ||
|
||
FullServerTickTiming() { | ||
super(IDENTIFIER); | ||
this.minuteData = new TimingData(this.id); | ||
|
||
TIMING_MAP.put(IDENTIFIER, this); | ||
} | ||
|
||
@Override | ||
public Timing startTiming() { | ||
if (TimingsManager.needsFullReset) { | ||
TimingsManager.resetTimings(); | ||
} else if (TimingsManager.needsRecheckEnabled) { | ||
TimingsManager.recheckEnabled(); | ||
} | ||
super.startTiming(); | ||
return this; | ||
} | ||
|
||
@Override | ||
public void stopTiming() { | ||
super.stopTiming(); | ||
if (!this.enabled) { | ||
return; | ||
} | ||
|
||
if (TimingsHistory.timedTicks % 20 == 0) { | ||
final Runtime runtime = Runtime.getRuntime(); | ||
double usedMemory = runtime.totalMemory() - runtime.freeMemory(); | ||
double freeMemory = runtime.maxMemory() - usedMemory; | ||
|
||
if (this.avgFreeMemory == -1) { | ||
this.avgFreeMemory = freeMemory; | ||
} else { | ||
this.avgFreeMemory = (this.avgFreeMemory * (59 / 60D)) + (freeMemory * (1 / 60D)); | ||
} | ||
|
||
if (this.avgUsedMemory == -1) { | ||
this.avgUsedMemory = usedMemory; | ||
} else { | ||
this.avgUsedMemory = (this.avgUsedMemory * (59 / 60D)) + (usedMemory * (1 / 60D)); | ||
} | ||
} | ||
|
||
long start = System.nanoTime(); | ||
TimingsManager.tick(); | ||
long diff = System.nanoTime() - start; | ||
|
||
CURRENT = Timings.timingsTickTimer; | ||
Timings.timingsTickTimer.addDiff(diff); | ||
//addDiff for timingsTickTimer incremented this, bring it back down to 1 per tick. | ||
this.record.curTickCount--; | ||
this.minuteData.curTickTotal = this.record.curTickTotal; | ||
this.minuteData.curTickCount = 1; | ||
boolean violated = isViolated(); | ||
this.minuteData.tick(violated); | ||
Timings.timingsTickTimer.tick(violated); | ||
tick(violated); | ||
|
||
if (TimingsHistory.timedTicks % 1200 == 0) { | ||
MINUTE_REPORTS.add(new TimingsHistory.MinuteReport()); | ||
TimingsHistory.resetTicks(false); | ||
this.minuteData.reset(); | ||
} | ||
|
||
if (TimingsHistory.timedTicks % Timings.getHistoryInterval() == 0) { | ||
TimingsManager.HISTORY.add(new TimingsHistory()); | ||
TimingsManager.resetTimings(); | ||
} | ||
} | ||
|
||
boolean isViolated() { | ||
return this.record.curTickTotal > 50000000; | ||
} | ||
} |
Oops, something went wrong.