Browse Source

Migrate to git.

master
Stefatorus 1 year ago
commit
533fa4fa5e
  1. 20
      .classpath
  2. 6
      .idea/misc.xml
  3. 8
      .idea/modules.xml
  4. 276
      .idea/workspace.xml
  5. 17
      .project
  6. 8
      .settings/fr.kazejiyu.discord.rpc.integration.prefs
  7. 29
      .settings/org.eclipse.core.resources.prefs
  8. 16
      .settings/org.eclipse.jdt.core.prefs
  9. 2
      .settings/org.eclipse.ltk.core.refactoring.prefs
  10. 4
      .settings/org.eclipse.m2e.core.prefs
  11. 84
      client.yml
  12. 10
      plugin.yml
  13. 740
      server.yml
  14. 199
      src/cx/sfy/LagAssist/Data.java
  15. 36
      src/cx/sfy/LagAssist/ExactTPS.java
  16. 148
      src/cx/sfy/LagAssist/Main.java
  17. 222
      src/cx/sfy/LagAssist/MonTools.java
  18. 255
      src/cx/sfy/LagAssist/Monitor.java
  19. 111
      src/cx/sfy/LagAssist/MsrExec.java
  20. 188
      src/cx/sfy/LagAssist/Physics.java
  21. 112
      src/cx/sfy/LagAssist/Redstone.java
  22. 17
      src/cx/sfy/LagAssist/api/APIManager.java
  23. 99
      src/cx/sfy/LagAssist/api/MotdAPI.java
  24. 145
      src/cx/sfy/LagAssist/chunks/ChkAnalyse.java
  25. 256
      src/cx/sfy/LagAssist/chunks/ChkLimiter.java
  26. 128
      src/cx/sfy/LagAssist/chunks/ChkStats.java
  27. 204
      src/cx/sfy/LagAssist/chunks/ChunkGenerator.java
  28. 101
      src/cx/sfy/LagAssist/chunks/DynViewer.java
  29. 86
      src/cx/sfy/LagAssist/client/ClientMain.java
  30. 85
      src/cx/sfy/LagAssist/client/ClientPacket.java
  31. 34
      src/cx/sfy/LagAssist/cmd/ClientCmdListener.java
  32. 294
      src/cx/sfy/LagAssist/cmd/CommandListener.java
  33. 49
      src/cx/sfy/LagAssist/cmd/CommandTabListener.java
  34. 78
      src/cx/sfy/LagAssist/cmd/StatsAnalyse.java
  35. 75
      src/cx/sfy/LagAssist/economy/EconomyManager.java
  36. 97
      src/cx/sfy/LagAssist/gui/AdminGUI.java
  37. 153
      src/cx/sfy/LagAssist/gui/ClientGUI.java
  38. 203
      src/cx/sfy/LagAssist/gui/DataGUI.java
  39. 196
      src/cx/sfy/LagAssist/gui/HopperGUI.java
  40. 387
      src/cx/sfy/LagAssist/hoppers/ChunkHoppers.java
  41. 209
      src/cx/sfy/LagAssist/hoppers/HopperFilter.java
  42. 91
      src/cx/sfy/LagAssist/hoppers/HopperManager.java
  43. 103
      src/cx/sfy/LagAssist/hoppers/SellHoppers.java
  44. 44
      src/cx/sfy/LagAssist/logpurger/PurgerMain.java
  45. 100
      src/cx/sfy/LagAssist/maps/TpsRender.java
  46. 708
      src/cx/sfy/LagAssist/metrics/BStats.java
  47. 64
      src/cx/sfy/LagAssist/metrics/MetricsManager.java
  48. 92
      src/cx/sfy/LagAssist/microfeatures/MicroManager.java
  49. 136
      src/cx/sfy/LagAssist/minebench/Approximate.java
  50. 43
      src/cx/sfy/LagAssist/minebench/BenchResponse.java
  51. 91
      src/cx/sfy/LagAssist/minebench/HTTPClient.java
  52. 146
      src/cx/sfy/LagAssist/minebench/SpecsGetter.java
  53. 141
      src/cx/sfy/LagAssist/minebench/SpeedTest.java
  54. 28
      src/cx/sfy/LagAssist/minebench/SysInfo.java
  55. 136
      src/cx/sfy/LagAssist/mobs/SmartMob.java
  56. 104
      src/cx/sfy/LagAssist/mobs/SpawnerMgr.java
  57. 25
      src/cx/sfy/LagAssist/packets/BlacklistHandler.java
  58. 44
      src/cx/sfy/LagAssist/packets/PacketHandler.java
  59. 137
      src/cx/sfy/LagAssist/packets/PacketInjector.java
  60. 49
      src/cx/sfy/LagAssist/packets/PacketMain.java
  61. 559
      src/cx/sfy/LagAssist/packets/Reflection.java
  62. 29
      src/cx/sfy/LagAssist/packets/ServerPackage.java
  63. 183
      src/cx/sfy/LagAssist/safety/SafetyAnticrash.java
  64. 72
      src/cx/sfy/LagAssist/safety/SafetyManager.java
  65. 322
      src/cx/sfy/LagAssist/stacker/StackChunk.java
  66. 195
      src/cx/sfy/LagAssist/stacker/StackComparer.java
  67. 270
      src/cx/sfy/LagAssist/stacker/StackManager.java
  68. 194
      src/cx/sfy/LagAssist/stacker/StackManipulator.java
  69. 286
      src/cx/sfy/LagAssist/stacker/StackMonitor.java
  70. 13
      src/cx/sfy/LagAssist/stacker/StackSpawners.java
  71. 19
      src/cx/sfy/LagAssist/superloader/SuperMain.java
  72. 190
      src/cx/sfy/LagAssist/updater/SmartUpdater.java
  73. 55
      src/cx/sfy/LagAssist/updater/UpdateCondition.java
  74. 124
      src/cx/sfy/LagAssist/updater/UpdateInfo.java
  75. 137
      src/cx/sfy/LagAssist/updater/VersionComparator.java
  76. 72
      src/cx/sfy/LagAssist/utils/Cache.java
  77. 34
      src/cx/sfy/LagAssist/utils/Chat.java
  78. 65
      src/cx/sfy/LagAssist/utils/MathUtils.java
  79. 102
      src/cx/sfy/LagAssist/utils/Others.java
  80. 61
      src/cx/sfy/LagAssist/utils/PaperOnly.java
  81. 87
      src/cx/sfy/LagAssist/utils/V1_11.java
  82. 74
      src/cx/sfy/LagAssist/utils/V1_12.java
  83. 90
      src/cx/sfy/LagAssist/utils/V1_13.java
  84. 64
      src/cx/sfy/LagAssist/utils/V1_8.java
  85. 151
      src/cx/sfy/LagAssist/utils/VersionMgr.java
  86. 38
      src/cx/sfy/LagAssist/utils/WorldMgr.java
  87. 1
      target/classes/.gitignore

20
.classpath

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry including="**/*.java" kind="src" output="target/classes" path="src">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="W:/Minecraft Versions/Paper-1.13.2-b624.jar"/>
<classpathentry kind="lib" path="W:/Minecraft Versions/Paper-1.12.2-b1618.jar"/>
<classpathentry kind="lib" path="W:/Minecraft Versions/PaperSpigot-1.8.8-R0.1-SNAPSHOT-latest.jar"/>
<classpathentry kind="lib" path="W:/Minecraft Versions/Spigot-1.15.jar"/>
<classpathentry kind="lib" path="W:/Custom Plugins/Vault.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

6
.idea/misc.xml

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

8
.idea/modules.xml

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/AdvancedLagAssist.iml" filepath="$PROJECT_DIR$/AdvancedLagAssist.iml" />
</modules>
</component>
</project>

276
.idea/workspace.xml

@ -0,0 +1,276 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="f3864c36-1f03-4c67-bc03-97e16bf3c609" name="Default Changelist" comment="" />
<ignored path="$PROJECT_DIR$/target/classes/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FUSProjectUsageTrigger">
<session id="1423070445">
<usages-collector id="statistics.lifecycle.project">
<counts>
<entry key="project.closed" value="1" />
<entry key="project.open.time.4" value="1" />
<entry key="project.opened" value="1" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.extensions.edit">
<counts>
<entry key="java" value="7" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.types.edit">
<counts>
<entry key="JAVA" value="7" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.extensions.open">
<counts>
<entry key="java" value="5" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.types.open">
<counts>
<entry key="JAVA" value="5" />
</counts>
</usages-collector>
</session>
</component>
<component name="FileEditorManager">
<leaf>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/cx/sfy/LagAssist/packets/Reflection.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="782">
<caret line="83" lean-forward="true" selection-start-line="83" selection-end-line="83" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/cx/sfy/LagAssist/packets/ServerPackage.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="68">
<caret line="4" column="12" selection-start-line="4" selection-start-column="12" selection-end-line="4" selection-end-column="12" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/cx/sfy/LagAssist/Main.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="197">
<caret line="61" column="18" selection-start-line="61" selection-start-column="18" selection-end-line="61" selection-end-column="18" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/cx/sfy/LagAssist/packets/PacketHandler.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="68">
<caret line="9" column="13" selection-start-line="9" selection-start-column="13" selection-end-line="9" selection-end-column="13" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/cx/sfy/LagAssist/packets/PacketMain.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="170">
<caret line="19" column="75" selection-start-line="19" selection-start-column="32" selection-end-line="19" selection-end-column="75" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/cx/sfy/LagAssist/maps/TpsRender.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="119">
<caret line="18" column="36" lean-forward="true" selection-start-line="18" selection-start-column="36" selection-end-line="18" selection-end-column="36" />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/src/cx/sfy/LagAssist/packets/Reflection.java" />
</list>
</option>
</component>
<component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="260" />
<option name="y" value="20" />
<option name="width" value="1400" />
<option name="height" value="1000" />
</component>
<component name="ProjectView">
<navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="AdvancedLagAssist" type="b2602c69:ProjectViewProjectNode" />
<item name="AdvancedLagAssist" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="AdvancedLagAssist" type="b2602c69:ProjectViewProjectNode" />
<item name="AdvancedLagAssist" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="AdvancedLagAssist" type="b2602c69:ProjectViewProjectNode" />
<item name="AdvancedLagAssist" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="LagAssist" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="AdvancedLagAssist" type="b2602c69:ProjectViewProjectNode" />
<item name="AdvancedLagAssist" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="maps" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="AdvancedLagAssist" type="b2602c69:ProjectViewProjectNode" />
<item name="AdvancedLagAssist" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="packets" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
<pane id="PackagesPane" />
<pane id="Scope" />
</panes>
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="f3864c36-1f03-4c67-bc03-97e16bf3c609" name="Default Changelist" comment="" />
<created>1540072256497</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1540072256497</updated>
</task>
<servers />
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
<layout>
<window_info id="Image Layers" />
<window_info id="Designer" />
<window_info id="UI Designer" />
<window_info id="Capture Tool" />
<window_info id="Favorites" side_tool="true" />
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.25" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info anchor="bottom" id="Version Control" show_stripe_button="false" />
<window_info anchor="bottom" id="Terminal" />
<window_info anchor="bottom" id="Event Log" side_tool="true" />
<window_info anchor="bottom" id="Messages" weight="0.329718" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" />
<window_info anchor="bottom" id="Run" order="2" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="right" id="Palette" />
<window_info anchor="right" id="Theme Preview" />
<window_info anchor="right" id="Capture Analysis" />
<window_info anchor="right" id="Palette&#9;" />
<window_info anchor="right" id="Maven Projects" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
</layout>
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/src/cx/sfy/LagAssist/packets/PacketHandler.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="68">
<caret line="9" column="13" selection-start-line="9" selection-start-column="13" selection-end-line="9" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/cx/sfy/LagAssist/maps/TpsRender.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="119">
<caret line="18" column="36" lean-forward="true" selection-start-line="18" selection-start-column="36" selection-end-line="18" selection-end-column="36" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/cx/sfy/LagAssist/Main.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="197">
<caret line="61" column="18" selection-start-line="61" selection-start-column="18" selection-end-line="61" selection-end-column="18" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/cx/sfy/LagAssist/packets/ServerPackage.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="68">
<caret line="4" column="12" selection-start-line="4" selection-start-column="12" selection-end-line="4" selection-end-column="12" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/cx/sfy/LagAssist/packets/PacketMain.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="170">
<caret line="19" column="75" selection-start-line="19" selection-start-column="32" selection-end-line="19" selection-end-column="75" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/cx/sfy/LagAssist/packets/Reflection.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="782">
<caret line="83" lean-forward="true" selection-start-line="83" selection-end-line="83" />
</state>
</provider>
</entry>
</component>
<component name="masterDetails">
<states>
<state key="ProjectJDKs.UI">
<settings>
<last-edited>1.8</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
</states>
</component>
</project>

17
.project

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>AdvancedLagAssist</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

8
.settings/fr.kazejiyu.discord.rpc.integration.prefs

@ -0,0 +1,8 @@
PROJECT_NAME=LagAssist
RESET_ELAPSED_TIME=RESET_ELAPSED_TIME_ON_NEW_PROJECT
SHOW_ELAPSED_TIME=true
SHOW_FILE_NAME=true
SHOW_LANGUAGE_ICON=true
SHOW_PROJECT_NAME=true
USE_PROJECT_SETTINGS=false
eclipse.preferences.version=1

29
.settings/org.eclipse.core.resources.prefs

@ -0,0 +1,29 @@
eclipse.preferences.version=1
encoding//src/cx/sfy/LagAssist/MonTools.java=UTF-8
encoding//src/cx/sfy/LagAssist/Monitor.java=UTF-8
encoding//src/cx/sfy/LagAssist/Physics.java=UTF-8
encoding//src/cx/sfy/LagAssist/Redstone.java=UTF-8
encoding//src/cx/sfy/LagAssist/chunks/ChkAnalyse.java=UTF-8
encoding//src/cx/sfy/LagAssist/chunks/ChkLimiter.java=UTF-8
encoding//src/cx/sfy/LagAssist/chunks/ChkStats.java=UTF-8
encoding//src/cx/sfy/LagAssist/chunks/ChunkGenerator.java=UTF-8
encoding//src/cx/sfy/LagAssist/chunks/DynViewer.java=UTF-8
encoding//src/cx/sfy/LagAssist/client/ClientMain.java=UTF-8
encoding//src/cx/sfy/LagAssist/cmd/CommandListener.java=UTF-8
encoding//src/cx/sfy/LagAssist/cmd/StatsAnalyse.java=UTF-8
encoding//src/cx/sfy/LagAssist/gui/AdminGUI.java=UTF-8
encoding//src/cx/sfy/LagAssist/gui/DataGUI.java=UTF-8
encoding//src/cx/sfy/LagAssist/hoppers/HopperManager.java=UTF-8
encoding//src/cx/sfy/LagAssist/logpurger/PurgerMain.java=UTF-8
encoding//src/cx/sfy/LagAssist/minebench/Approximate.java=UTF-8
encoding//src/cx/sfy/LagAssist/minebench/HTTPClient.java=UTF-8
encoding//src/cx/sfy/LagAssist/minebench/SpeedTest.java=UTF-8
encoding//src/cx/sfy/LagAssist/mobs/SmartMob.java=UTF-8
encoding//src/cx/sfy/LagAssist/mobs/SpawnerMgr.java=UTF-8
encoding//src/cx/sfy/LagAssist/packets/PacketMain.java=UTF-8
encoding//src/cx/sfy/LagAssist/packets/Reflection.java=UTF-8
encoding//src/cx/sfy/LagAssist/safety/SafetyManager.java=UTF-8
encoding//src/cx/sfy/LagAssist/stacker/StackManager.java=UTF-8
encoding//src/cx/sfy/LagAssist/superloader/SuperMain.java=UTF-8
encoding//src/cx/sfy/LagAssist/updater/SmartUpdater.java=UTF-8
encoding//src/cx/sfy/LagAssist/utils/WorldMgr.java=UTF-8

16
.settings/org.eclipse.jdt.core.prefs

@ -0,0 +1,16 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8

2
.settings/org.eclipse.ltk.core.refactoring.prefs

@ -0,0 +1,2 @@
eclipse.preferences.version=1
org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false

4
.settings/org.eclipse.m2e.core.prefs

@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

84
client.yml

@ -0,0 +1,84 @@
# _ _ _
# | | /\ (_) | |
# | | __ _ __ _ / \ ___ ___ _ ___| |_
# | | / _` |/ _` | / /\ \ / __/ __| / __| __|
# | |___| (_| | (_| |/ ____ \\__ \__ \ \__ \ |_
# |______\__,_|\__, /_/ \_\___/___/_|___/\__|
# __/ |
# |___/ By Stefatorus
#
# This is the default configuration. I suggest using it as it is.
# If you need help configuring it, please add me on discord.
# DISCORD: Stefatorus#9382
#
# The Client-Side tweaks offer a nice way to improve your player's experience.
# It offers ways to hide some laggy features in minecraft and thus simplify the game
# for the players, while the server still works as normally.
#
# NOTE: THE CLIENT-SIDE TWEAKS SHOULD WORK ON 1.8-1.13.1, BUT SOME FUTURE VERSIONS
# MAY NOT WORK OUT OF THE BOX. PLEASE CONTACT ME TO UPDATE THIS SYSTEM IF
# ANY PROBLEM ARISES.
settings:
# The client-side tweaks are currently experimental. They have been tested decently,
# but not against a large range of systems and minecraft versions. Please take care.
enabled: false
# Set the command that players will use to open the client-side optimizer.
command: "optimize"
# Set the permission required for players to be able to use the client optimizer.
permission: "lagassist.clientoptimize"
# The GUI name for the client-side optimizer.
gui-name: "&0&lPerformance Settings"
# The prefix of client-side optimizer messages.
prefix: "&c&lOptimize &e» &f"
# The default cliet-side tweaks that will be enabled
defaults:
tnt: true
sand: true
particles: false
pistons: false
language:
tnt:
name: "&cTNT Optimization"
lore:
- "&f"
- "&fHides TNT entities to greatly reduce lag when"
- "&fthere's a lot of TNT exploding at the same time"
- "&f"
sand:
name: "&eFalling Block Optimization"
lore:
- "&f"
- "&fHides sand entities to improve performance"
- "&fwhen there is a lot of sand falling around."
- "&f"
particle:
name: "&dParticle Optimization"
lore:
- "&f"
- "&fDisables server-side particles"
- "&fso the client doesn't have to render them."
- "&f"
piston:
name: "&8Piston Optimization"
lore:
- "&f"
- "&fDisables Piston Animations"
- "&fin order to optimize piston extensions."
- "&f"
toggleon:
name: "&aEnable this"
lore:
- "&f"
- "&fClick Here to enable this feature."
- "&f"
toggleoff:
name: "&cDisable this"
lore:
- "&f"
- "&fClick Here to disable this feature."
- "&f"
# This allows the system to update the config if the plugin is updated.
version: 4

10
plugin.yml

@ -0,0 +1,10 @@
name: LagAssist
author: Stefatorus
version: 2.23.2
api-version: 1.13
description: LagAssist is an advanced anti-lag solution that allows server owners find and remove lag using multiple advanced and efficient methods.
main: cx.sfy.LagAssist.Main
softdepend: [Vault]
commands:
lagassist:
description: The main command of LagAssist, a Performance Analysis and Optimization Tool.

740
server.yml

@ -0,0 +1,740 @@
# _ _ _
# | | /\ (_) | |
# | | __ _ __ _ / \ ___ ___ _ ___| |_
# | | / _` |/ _` | / /\ \ / __/ __| / __| __|
# | |___| (_| | (_| |/ ____ \\__ \__ \ \__ \ |_
# |______\__,_|\__, /_/ \_\___/___/_|___/\__|
# __/ |
# |___/ By Stefatorus
#
# This is the default configuration. I suggest using it as it is.
# If you need help configuring it, please add me on discord.
# DISCORD: Stefatorus#9382
#
# Mobs that will be removed by the smart cleaner.
#
# TIP: This will not remove named mobs, even if they are in the list.
# This follows the vanilla rule - don't despawn named entities, which
# players are allready acustom to.
smart-cleaner:
# Do you want the system to be in whitelist or blacklist mode?
# TIP: Whitelist - All except these get deleted ; Blacklist is the opposite
whitelist: false
# Automatic Physics disabler will occur if tps is under this value.
# EG: If tps is under 16, lagassist will disable the physics that are
# TIP: Set to 0.0 to disable it.
maxtps-cull: 16.0
# Automatically disable mob spawning if tps is under this value.
# EG: If tps is under 14, lagassist will disable mob spawning.
maxtps-disablespawn: 14.0
# List of the mobs that will get removed by the smart-cleaner.
# Mob names: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html
mobs:
- "ZOMBIE"
- "CREEPER"
- "SKELETON"
- "WITHER_SKELETON"
- "SQUID"
- "SPIDER"
- "SILVERFISH"
- "PIG_ZOMBIE"
- "MINECART"
- "ILLUSIONER"
- "GHAST"
- "HUSK"
- "EVOKER"
- "ENDERMAN"
- "ENDERMITE"
- "ELDER_GUARDIAN"
- "CAVE_SPIDER"
- "BAT"
- "BLAZE"
# For Creative Servers
# - ARMOR_STAND
# For Factions Servers
# - PRIMED_TNT
# The smart stacker system allows you to efficiently stack mobs in a chunk based on a
# cubic chunk splitting system. This algorithm is extremely light-weight compared
# to past stacking algorithms, which means more performance left for your server.
smart-stacker:
# Should we enable the smart stacker system?
enabled: false
checks:
# Run stack check when a mob spawns.
spawn-check: true
# (!) Way more efficient than spawn check, but only works on custom tailored paper forks. You can use both for
# best performance.
# DO NOT ENABLE IF YOUR CUSTOM TAILORED FORK DOESN'T SET A TIMEOUT BEFORE RETRYING TO SPAWN ANOTHER MOB.
pre-spawn-check: false
# Should we try to stack mobs when they change splits?
# Disabling it may improve performance, but it's not recommended since it disables
# stacking when moving from one chunk to another.
split-change-check: true
gameplay:
# Should players always see stacked mob tags?
# (!) Setting to false will make it so you can only see mob stacking when hovering over a mob
tag-visibility: true
# Size is required if you want stacking to work.
tag-format: "&f{type} &cx{size}"
# What entity types don't you want to be stackable.
stackable:
# - "SKELETON"
# - "ZOMBIE"
# - "BLAZE"
# - "VINDICATOR"
# - "VILLAGER"
# - "WITCH"
# - "SPIDER"
# - "EVOKER"
technical:
# The amount of vertical splits per chunk (Must divide 256). A lower amount makes the stacking area go down and thus
# improve compatibility with farms.
# (!) Setting it under 4 is not recommended. 8, 16 recommended.
splits: 8
# Should we remove all stacked mobs when the plugin is disabled? (DISABLED FEATURE)
# (!) Highly suggested to be left on true, since it can help a lot with TPS. It
# also prevents the algorithm having to search the old mobs when the chunk issue
# empty which is a huge bonus.
# (!) If left on false, the system will do stacking on chunk enable.
# shutdown-clean: false
# Should we amplify drops to get the approximate value of what those mobs would drop
# if they were to be killed one by one?
drops-fix: true
# What's the highest amount a stack can get to? Since there's a limit of 1 stack per
# split, it's useful to keep this higher.
max-stack: 500
# This section deals with custom handling for damage for stacked mobs.
damage:
# What damage causes should be multiplied by the stack count.
# (!) This helps with farms. For example, multiplying fall damage fixes
# drop farms.
multiply:
- "CRAMMING"
- "FALL"
- "DROWNING"
- "CONTACT"
- "VOID"
- "FIRE_TICK"
- "DRYOUT"
# Entity Comparison is used to prevent 2 similar entities from being stacked together.
# Extremely useful when you want to retain vanilla-like gameplay.
comparison:
sheep: true
pig: true
slime: true
villager: false
tameable: true
horse: true
# Checks for the age of the mob approximatively
ageable: false
# This is a simple mob modifier. It changes how some mobs behave to improve the server
# performance.
mob-manager:
# Disable armorstand gravity. This might help with creative servers which have a lot of armorstands.
no-armorstand-gravity: false
# Disable slime splitting, approximating the drops and health of a vanilla confrontation. This is very
# useful for larger than vanilla slimes.
# NOTE: This also helps for vanilla slimes, but shouldn't (in my opinion) be used unless there is lag from
# NOTE: slimes.
simple-slime: false
# Micro features represent simple yet effective ways to reduce lag. It generally includes simple to implement
# features that would otherwise not need their own section.
microfeatures:
# Optimize farms by automatically destroying crops that are near a piston facing them.
# Helps reduce the need of redstone for these farms. Really useful on 1.8.8 factions servers.
optimize-growable-farms:
enable: false
blocks:
- "PUMPKIN"
# Two versions (flattening and pre)
- "MELON_BLOCK"
- "MELON"
# Laggy Chunk detection. You can fiddle around and find the best settings for your
# server.
#
# TIP: Find what kind of tiles or entities lag your server and set them a proper lag score
# here. The default values should be fine, but finding the best settings for yourself is allways
# the best way.
chunkanalyse:
# Teleport command that will be issued when you click the text.
# PLACEHOLDERS: {x}, {y}, {z}, {chunkx}, {chunkz} {world}
#
# TIP: Set it to a command that you like. This can be used to automatically clear lag in chunks, unload it, etc.
tp-cmd: "lagassist tpchunk {world} {chunkx} {chunkz}"
# Score at wich the server will consider the chunk laggy and make it appear in the list. You should fiddle around with it so it only shows
# the chunks that you want it to find.
#
# TIP: The amount of chunks /lagassist chunkanalyse will show.
# (It will always show the top (amount value) laggiest chunks.)
ammount: 10
# Entity & Material names for laggy values.
#
# materials: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
# entities: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html
# tile entities: https://minecraft.gamepedia.com/Block_entity
#
# TIP: Only detects Tile entities & entities. Normal blocks aren't ticked. This means that it would lag if i were to check the normal blocks.
# At the same time, normal blocks don't lag the server.
values:
# -------------
# TILE ENTITIES
# -------------
chest: 1
trapped_chest: 2
burning_furnace: 3
sign: 1
# Beacons don't really lag the server, but they usually appear in laggy chunks due to them being placed near grinders & automatic farms.
# High score due to their rarity.
beacon: 35
hopper: 6
note_block: 4
piston_extension: 5
dispenser: 10
# Mob spawners really lag the server. I suggest setting a high score related to them.
mob_spawner: 60
# --------------
# NORMAL ENTITIES
# --------------
# Players themselves. They have a decent score due to them being a lag cause (they create farms, afk at them, etc)
player: 15
# Normal mobs that are found in a chunk. Set the value to a moderate one. They don't lag the server so much.
# Creeper score slightly higher due to the explosion that could lag the server a bit.
zombie: 2
spider: 2
skeleton: 2
creeper: 3
# Passive mobs. Might signal some custom spawner farms. They are pretty optimised in AdvancedSpigotTweaks though.
cow: 1
pig: 1
# Thrown items. Don't pose a huge issue due to them being optimised by AdvancedSpigotTweaks. The endereye (ender_signal) might
# mean there is a end portal nearby, that might mean more activity (and thus, lag). Egg can spawn mobs and such has a higher score.
ender_signal: 5
egg: 3
fishing_hook: 2
ender_pearl: 2
snowball: 2
arrow: 1
# Static entities might lag the server, but it all depends. They usually signal a big player city, and such is related to lag.
painting: 2
item_frame: 3
armor_stand: 4
# Stacked items & XP do not lag the server as much. If you use AdvancedSpigotTweaks, keep that in mind.
# Fireworks might lag the server, especially if they have big explosions.
dropped_item: 2
experience_orb: 3
firework: 8
# Bosses have complex abilities that might lag your server. The ability entities can also offer additional proof the
# bosses are actively fighting.
ender_dragon: 85
ender_crystal: 10
wither: 55
wither_skull: 20
# Tnt is a severe lag issue. I recommend setting primed tnt (activated tnt) to a higher score. Remember that a tnt by
# itself doesn't lag as much, but they are used in mass numbers in cannons, etc.
# Minecart-TNTS are evem bigger of an issue due to their moving mechanics.
primed_tnt: 7
minecart_tnt: 15
# Highly active entities. Includes entities that do many checks, and are used for mechanics.
minecart_hopper: 20
minecart_mob_spawner: 80
endermite: 5
# Chunk-Manager System.
chunk-manager:
# Should we enable the chunk-manager? It can highly help with memory issues if you have too many loaded chunks.
# NOTE: You need to have the max view distance set in your server.properties file.
#
# (!) This feature will only work on PaperSpigot servers.
enabled: false
# How many chunks should all players load at the same time.
# TIP: The view distance is calculated using this formula:
# SQRT(MAX-CHUNKS / PLAYERS / 4).
# EG: If the max chunks are at 6500, and you have 100 players online
# your view distance would be at 4.
# (!) In order for this to work, please set your view distance in
# both server.properties & spigot.yml to the minimum view distance you
# want to set.
max-chunks: 5000
# (!) Try making it larger progressively. Sometimes it's safe to limit it
# at a smaller view distance.
max-view: 12
#LagMeasures Config
lag-measures:
# Lag measures automatically runs anti-lag actions if the server has
# under a set amount of TPS. To configure the tps values, look for
# the maxtps setting in all lagassist systems.
#
# Announce the lag cleaning in the console and chat.
announce:
# Show players that the lag-cleaning has occured.
enabled: false
# Should we show the staff a different, more exact message of lag-measures?
# Permission node: lagassist.notify
staffmsg: true
message: "&c&lLag&f&lAssist &e» &fRemoving server lag..."
# Set the time between the lag-cleaning cycles.
# I suggest keeping it on 6000 as the fact that it disables redstone
# machines might annoy some players if it is done too often.
#
# TIP: Time is measured in ticks. 1 second has a tick
# (For 10 second interval, set to 200)
timer: 6000
# RedstoneCuller Tweaks
redstone-culler:
# Chance from 1 to 100 for the redstone to break. If you don't think
# redstone could lag your server, disable it.
#
# The breaker system griefs some redstone from Players' contraptions in
# order to prolongue the effect of the cull. If it is set to 0, it will
# be harder to get rid of redsotne lag, because players can just start
# their farms & Lag Machines back up in a matter of seconds.
#
# TIP: The chance doesn't need to be too big in order for their farms to
# break. The system triggers for all of the active redstone trails and will
# break X percent of the track. Remember that even if you have chance 2, if
# we have 100 redstone, you will still have an effect on them.
#
# (!) TO disable set chance to 0.
chance: 3
#
# What blocks do you want to be affected by the redstone culler. This allows you
# to prevent pressure plates or other valuable blocks that don't necessarily cause
# lag to be protected from the culler.
affected-materials:
- "REDSTONE"
- "REDSTONE_WIRE"
- "REDSTONE_COMPARATOR"
- "REDSTONE_COMPARATOR_OFF"
- "REDSTONE_COMPARATOR_ON"
- "REDSTONE_TORCH_OFF"
- "REDSTONE_TORCH_ON"
- "REDSTONE_TORCH"
- "DIODE"
#
# How many ticks should the redstone be culled if the signal changes. A too small value
# will not stop clocks, and a too large value will make destructive checks less effective.
#
# TIP: The recommmended value for destructive checks is 10-30; and 50-70 without.
ticks: 60
# Destructive checks. Implemented to combat Observer lagmachines, which can bring
# a I7-4770k machine to it's knees quite easily. It listens for singal changes and
# removes all observers that go over a set value.
# Lag-Machine example: http://stefatorus.go.ro/img/SpigotTweaks/ObserverFix.gif
#
# (!) This should be safe, but at the same time, don't enable it without any reason.
# These lag machines are not found very often, and there is no reason to try fix them
# if everything works fine.
destructive:
# Should we enable destructive checks?
enabled: false
# How many updates should the observer do in order to remove it? I recommend the default value.
value: 16
#
# Automatic Redstone culling will occur if tps is under this value.
# EG: If tps is under 19, lagassist will cull redstone each time the monitor runs.
# TIP: Set to 0.0 to disable it.
maxtps: 19.0
# Disable hopper crafting. Hoppers are one of the issues non-minigame server owners have to face. Enabling this
# check allows you to make hoppers more rare. This won't really affect farms, but will make them more efficient.
#
# Hoppers are easy to craft in vanilla minecraft, and this makes them to get overused (>100 HOPPERS/FARM)
hopper-check:
enabled: false
reason: "&c&lLag&f&lAssist &e» &fHopper crafting has been disabled."
# Sabotage hoppers in order to defer players from using them. This
# will break huge farms in a while, and has a bigger chance of destroying
# large hopper lines instead of single hoppers. (multyply by how many)
#
# TIP: This is is not percent, it is per10mille (X in 10000 chance).
# Don't set it too big. If you set it to 1 or 2, it will make sure
# huge afk farms will break and won't lag your server for actually
# active players, while also not annoying the less-extreme players.
#
# Disable by setting it to 0.
chance: 0
# Make item drops go directly into hoppers. This was designed with
# factions servers in order to replace plugins like crophoppers and
# in general improve performance for many hopper drops.
chunk-hoppers:
# Should we enable chunk hoppers? They will catch all items
# that aren't dropped by players and are ine items list and
# place it in the chosen hopper.
enabled: true
# What mode do you want to use for chunk hopper additions
# FIRST - Uses first hopper that is available
# RANDOM - Get a random hopper (may help with logistic speed)
# CLOSEST - Uses hoppers in ordered by their range to the item.
mode: "RANDOM"
# How do you want chunk-hoppers to be defined?
# DEFAULT - All hoppers become chunk-hoppers. Useful for already
# established servers that haven't used them in the current
# season or wipe.
# NAME - Hoppers being named customly are chunk-hoppers. Will reduce
# the amount of hoppers that need sorted and thus will possibly
# improve performance (if they are properly advertised on the server)
define: "&eChunk &fHopper"
# The filter system allows you to give players the ability to filter what items the chunk hoppers will pick. It is really useful
# for creating simple & performance efficient filters, along with incentivizing people to use chunk hoppers.
filter:
# The default items that chunk hoppers should pick up. This is used in case a hopper doesn't have a custom filter.\
# (!) In case you use the custom hopper filter, please make sure to set the slots larger than the amount of slots in default.
default:
- "IRON_ORE"
- "ROTTEN_FLESH"
- "BONE"
- "ARROW"
gui:
# The name that the filtering GUI should have. This can be used to customize the looks of the
# filter system.
name: "&d&lHopper Filter"
# This represents the size of the GUI that the filter represents. Tweaking these settings allows
# you to choose how complex a filter can get.
# (!) Must be a multiple of 9.
size: 18
# Mob hoppers allow people to instanly funnel spawner mob drops to chunk hoppers. It works using the filter that is found above.
# Players will have to add a mob spawnegg to the hopper to allow it to catch the respective mob.
mob-hopper:
# (!) Note: Mob Hoppers currently only work on 1.13+ servers.
#
# This check can be used to alleviate lag during extreme lag sessions, or used temporarily. While i suggest
# keeping it on all the times, if your players don't mind having to have their grinder account for it, you can
# make it only run when the server lags.
# (!) To disable mob hoppers from working, just set max-tps to 0.
# I suggest 17 if you want it temporary, or 20 if you want it permanent.
maxtps: 0.0
# The reasons that the mob hopper will work for. This allows you to exclude normal mob
# spawns from being funneled to the chunk hopper.
spawn-reasons:
- "SPAWNER"
- "NETHER_PORTAL"
# Multiplying the drop amount can help you fiddle with mob spawns without changing the
# amount players win from a hopper, effectively tuning performance drastically without
# negatively affecting the players.
multiplier: 1
# Entity Materials represent the materials that will allow their respective mobs to
# get caught in mob hoppers.
filter-items:
zombie: "ROTTEN_FLESH"
creeper: "GUNPOWDER"
skeleton: "BONE"
# Automatically sell items that appear in this list before attempting to place them in the chunkhopper.
# Useful and efficient replacement for autosell chests. Requires Vault to function.
sell-hopper:
# Should we enable the sellhopper system?
# (!) To enable, please also add the "lagassist.sellhopper.PERCENTAGE" permission to the player.
# Example: lagassist.sellhopper.70 gives the player 70% of the price.
#
enabled: false
# The amount users will be paid at the end of the payout session. The payout session is used to prevent
# lag.
prices:
ROTTEN_FLESH: 10
GUNPOWDER: 5.3
BONE: 1
# The limiter allows you to limit the amount of mobs & tiles there are on a single chunk.
# This system can be used to deny abusing spawning mobs, minecarts, etc.
#
# The soft-limit represents the limit to where mobs will be allowed to spawn in the chunk.
# The hard-limit represents the limts to where mobs will be removed when brought from other chunks (eg: Water slides or rails)
#
# This allows you to limit mobs while also allowing them to move between chunks.
limiter:
# The amount of time between chunk cleans. Setting it to a small amount can make your server have more lag, while a larger amount may mean slower
# responses
timer-time: 1200
mobs:
# The maximum limit of mobs that can spawn per chunk. Set this to a larger number, and use
# the per-limit system to set limits for certain types of mobs.
total-limit: -1
soft-limit:
# Dropped items are here because we don't want dropped items not to spawn.
dropped_item: 200
entity2: -1
#armor_stand: 20
hard-limit:
entity1: 100
#armor_stand: 100
tiles:
# The maximum limit of tile entities that can be placed per chunk. Note that there are
# very many types of tile entities, and they don't produce so much lag. This has limited
# uses for lag prevention, but may be used for other tasks.
# (!) Set to '-1' to disable it.
total-limit: -1
per-limit:
#crafthopper: 16
#craftchest: 128
tileentity1: -1
tileentity2: -1
# Anti Spawner-Lag implementation for large servers with a lot of spawners.
spawner-check:
# Should we enable the spawner check?
enabled: true
# Should we break spawners with a set chance (permille)? This highly helps
# severs where spawners are very easily procured.
breaker: false
# What chance (permille) should we have.
# EG: If you set it to 5, the chance will be 5/1000 which is 1/200;
chance: 5
# Custom spawner implementation. This should work with all spawner
# plugins, like EpicSpawners or SilkSpawners.
custom-settings:
# Delay in ticks between mob spawner spawns.
delay: 300
# (!) 1.12 ONLY FEATURES
# How many mobs should we spawn. This can greatly lower the mob lag
# from mob-spawners.
amount:
min: 1
max: 2
# How spread out we should spawn the entities. I recommend keeping it lower.
spawnrange: 3
# The maximum distance a player can be in order for the spawner to be active.
player-range: 10
# Automatic Spawner-Check activator. This will have no effect if the check is
# disabled.
# EG: If tps is under 19, lagassist will start modifying how the spawners work.
# TIP: Set to 0.0 to disable it.
maxtps: 16.0
# The Physics system disables laggy or ununsed game mechanics that might lag your server. The physics system can
# be set to be enabled on start or by using /lagassist.
#
# TIP: Disabling it here won't actually remove the checks when you use /lagassist. If you want some checks to
# work, please add them here.
deny-physics:
# Should we disable physics just as the server starts?
# TIP: It can be used to modify gameplay features.
# For example, you can disable decay, fire & melting for a build server.
enabled: false
# Automatic Physics disabler will occur if tps is under this value.
# EG: If tps is under 16, lagassist will disable the physics that are
# TIP: Set to 0.0 to disable it.
maxtps: 17.0
# What should we disable? Please make sure this fits your game perfectly. If you have a cannoning server,
# disabling explosions would be useless. At the same time, you shouldn't enable them for a survival server.
systems:
physics: false
explosions: true
grassspread: true
melting: true
pistons: true
fire: true
liquidspread: true
decay: true
redstone: true
# Had reports of noteblock & observer machines to lag the server significantly
noteblock: true
benchmark:
# Benchmarking can be used to approximate the max players your server will be able
# to sustain.
#
# TIP: If you want more accurate results (and don't mind waiting longer), change the
# ftp link under here.
# Placeholders: %RND% - Generate random name (useful for upload testing).
#
# (!) The size for upload is in bytes. A MB = 1.000.000 bytes. Default is 50MB
download:
link: "ftp://speedtest.tele2.net/50MB.zip"
upload:
link: "ftp://speedtest.tele2.net/upload/%RND%.bin"
size: 50000000
blacklisted-worlds:
# Worlds where this plugin will have no effect. All lag-measures will simply be disabled.
# (!) Analysis features are not disabled. (LagMonitor, LagMap)
enabled: false
list:
- blacklisted1name
- blacklisted2name
safety-manager:
# The safety manager tries to lower the chances of a server crash when the server
# is under extreme load or doesn't have enough resources to run.
#
# It will safely shut down the server whenever the respective settings are met.
# (!) This is an experimental feature and is still not recommended by default.
enabled: false
# Triggered when the system's space is not enough for a minecraft server. Shutting
# down the server prevents glitched chunks from forming.
no-space:
# Space for the server to start up in bytes. The default is 50 MB.
startup-space: 50000000
# Threshold under which server will safely shutdown th server. Default is 20MB.
shutdown-space: 20000000
# The anti-crasher module helps prevent players from crashing the server by spamming packets.
#
# It does so by limiting the amount of packets sent per second, along with their size.
anti-crasher:
# Useful against book crashers.
settings:
# When debug mode is on, you can see the serialized packets. Useful for analysing crash clients
# and solving them properly.
# (!) Only shows for packets that have a config location.
debug: false
packets:
packetplayinsetcreativeslot:
# The amount of packets recorded before the player gets dropped.
drop-threshold: 350
# The amount of packets to 'forget' each second.
decay: 80
# The max size of packet allowed. Useful for huge pages, etc.
size: 10000
# Illegal values in the packet. The values are found using deserialzation.
illegals:
- "THIS IS A TEST ILLEGAL VALUE"
# Fixing custom payload spam. May cause issues with bungee if you have some strange plugins. (Check size)
packetplayincustompayload:
drop-threshold: 25
decay: 15
size: 15000
illegals: []
packetplayinuseentity:
drop-threshold: 25
decay: 21
size: 5500
illegals: []
packetplayinuseitem:
drop-threshold: 25
decay: 21
size: 5500
illegals: []
packetplayinblockdig:
drop-threshold: 25
decay: 21
size: 2500
illegals: []
packetplayinblockplace:
drop-threshold: 25
decay: 21
size: 22000
illegals: []
packetplayinwindowclick:
drop-threshold: 25
decay: 21
size: 19000
illegals: []
packetplayinchat:
drop-threshold: 30
decay: 20
size: 10000
illegals: []
logcleaner:
# The Log-Cleaner cleans old logs from the directories that you select. You can use this feature to get rid of old
# logs.
#
# maxsize = Max size (in megabytes) that the log needs to have in order to be cleaned.
# maxage = Max time (in days) that the log needs to have in order to get removed.
#
# (!) Both of these settings are independent. If any of these conditions are met, the
# (!) file will get removed.
enabled: true
list:
- "logs/"
conditions:
maxsize: 30
maxage: 7
# (!) Highly Experimental! - May cause irreversible damage to your server. Please use with care.
super-loader:
# The super loader feature allows LagAssist and other plugins to implement so called "NMS Expansions".
# NMS Expansions allow the modification of minecraft classes during runtime.
enabled: false
stats-bar:
# The statsbar can be accessed using /lagassist statsbar. You can configure it to better show your server
# performance, or to better resemble your server's design choices.
# PLACEHOLDERS: {TPS} {CHKS} {MEM} {ENT}
message: "&c&l⬛ &fTPS: &a{TPS} &7&m|&r &fMEM: &a{MEM}GB &7&m|&r &fCHKS: &a{CHKS} &7&m|&r &fENT: &a{ENT} &c&l⬛"
# The interval in which the tps average is created. A lower value will be more acurrate but will fluctuate a lot.
# I suggest setting it around 6-12 for it to be the most precise.
tps-interval: 10
# How often should we refresh the statsbar? A lower value will look nicer and is more accurate, but might take more
# (yet a minuscule difference) processing power to show.
show-delay: 5
# The system that creates the lagmap.
lag-map:
# Do you want us to fully reserve filled_map:0? This will allow for placing lagmaps in spawns and giving them to players.
fully-reserve: false
# The lagassist API provides tools for other plugins to get information from your server using
# unconventional methods such as server-icon serialization. This provides several improvements
# over plugin messaging.
#
# (!) Currently used in the EntryRise.com Monitoring tool.
api:
# Config section for server icon data.
server-icon:
# THE IPS allowed to use this api. Empty to disable
# this feature.
# (!) Star matches everything
allowed-ips:
- "1.2.3.4"
- "9.9.9.9.*"
# This system allows you to configure the SmartUpdater Reminder. This
# system was developed to better notify users of important changes to
# the plugin and alert people using old and maybe inefficient ways of
# using the plugin.
smart-updater:
# This feature allows you to choose which updates you will get
# notified for. The default should only announce stable versions.
enabled: true
announce:
# Don't announce updates that have been flagged as unsafe due to
# major issues that have been detected.
unsafe: false
# Minimum likes received for the update post. Likes are usually
# given when a large bug has been fixed or i've added a new feature.
min-likes: 1
# Minimum downloads to announce the update.
min-downloads: 10
# Minimum rating. Note that unrated counts as 5 stars.
min-rating: 3.95
settings:
# Tooltips notify you when something may be broken in the current LagAssist version along with
# information to help you to remedy the issue.
tooltips: true
# The untested system notifies you if you are using the plugin on untested versions in order
# to prevent misuse.
untested: true
# Controls for plugins lagassist hooks into.
hooks:
# Vault is used for paying money to users.
vault:
# How much should the money be cached before being paid. A smaller value means faster payments at the expense of performance.
cache-duration: 1200
# What message should show up to players that get paid. %amount% for paid amount.
message: "&c&lLag&f&lAssist &e» &fYou were paid %amount% in the paywave."
# This allows the system to update the config if the plugin is updated.
version: 29

199
src/cx/sfy/LagAssist/Data.java

@ -0,0 +1,199 @@
package cx.sfy.LagAssist;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.OfflinePlayer;
import org.bukkit.block.Hopper;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.map.MapView;
import cx.sfy.LagAssist.hoppers.SellHoppers;
import cx.sfy.LagAssist.packets.Reflection;
import cx.sfy.LagAssist.utils.WorldMgr;
public class Data {
private static File dataf = new File(Main.p.getDataFolder(), "data.yml");
private static FileConfiguration data = new YamlConfiguration();
public static void Enabler() {
try {
if (!dataf.exists()) {
dataf.createNewFile();
}
data.load(dataf);
} catch (Exception e) {
e.printStackTrace();
}
if (!data.contains("version")) {
if (data.contains("hoppers")) {
for (String rawh : data.getConfigurationSection("hoppers").getKeys(false)) {
String loc = "hoppers." + rawh;
List<String> values = data.getStringList(loc);
data.set(loc, null);
data.set(loc + ".materials", values);
}
}
data.set("version", 1);
saveData();
}
}
private static void saveData() {
//
// if (System.currentTimeMillis() - last < 1000) {
// return;
// }
//
//
// Bukkit.getScheduler().runTaskAsynchronously(Main.p, () -> {
try {
data.save(dataf);
} catch (IOException e) {
e.printStackTrace();
}
// });
}
private static short genMapId() {
MapView newe = Bukkit.createMap(Bukkit.getWorlds().get(0));
short mapid = (short) Reflection.getId(newe);
data.set("data.mapid", mapid);
saveData();
return mapid;
}
public static short getMapId() {
if (data.contains("data.mapid")) {
int mapid = data.getInt("data.mapid");
// if (Reflection.getMapView(mapid) == null) {
// return genMapId();
// } else {
// return mapid;
// }
return (short) mapid;
} else {
return genMapId();
}
}
public static void deleteHopper(Hopper h) {
String cloc = "hoppers." + WorldMgr.serializeLocation(h.getLocation());
data.set(cloc, null);
saveData();
}
public static boolean isSellHopper(Location loc) {
String cloc = "hoppers." + WorldMgr.serializeLocation(loc);
return data.getBoolean(cloc + ".sellhopper", false);
}
public static boolean toggleSellHopper(Player p, Location loc) {
String cloc = "hoppers." + WorldMgr.serializeLocation(loc);
String owner = data.getString(cloc + ".owner", "NONE");
if (!(p.getUniqueId().toString().equals(owner) || p.hasPermission("lagassist.hopper.bypass"))) {
p.sendMessage(Main.PREFIX + "You can't toggle selling for a hopper not owned by you");
return false;
}
String percentage = "§e" + SellHoppers.getMultiplierPercentage(Bukkit.getOfflinePlayer(p.getUniqueId())) + "%";
if (isSellHopper(loc)) {
data.set(cloc + ".sellhopper", false);
p.sendMessage(Main.PREFIX + "This sellhopper has been §cdisabled§f at " + percentage + "§f.");
saveData();
return true;
} else {
data.set(cloc + ".sellhopper", true);
p.sendMessage(Main.PREFIX + "This sellhopper has been §aenabled§f at " + percentage + "§f.");
saveData();
return true;
}
}
public static OfflinePlayer getOwningPlayer(Location loc) {
String cloc = "hoppers." + WorldMgr.serializeLocation(loc);
if (data.contains(cloc + ".owner")) {
return Bukkit.getOfflinePlayer(UUID.fromString(data.getString(cloc + ".owner")));
}
return null;
}
public static void setOwningPlayer(Location loc, OfflinePlayer owner) {
String cloc = "hoppers." + WorldMgr.serializeLocation(loc);
data.set(cloc + ".owner", owner.getUniqueId().toString());
saveData();
}
public static Set<Material> getFilterWhitelist(Location loc) {
String cloc = "hoppers." + WorldMgr.serializeLocation(loc);
List<String> found = null;
if (data.contains(cloc + ".materials")) {
found = data.getStringList(cloc + ".materials");
}
Set<Material> allowed = new HashSet<Material>();
if (found == null) {
return allowed;
}
for (String stg : found) {
allowed.add(Material.getMaterial(stg));
}
return allowed;
}
public static void saveFilterWhitelist(Location loc, Set<Material> mats) {
String cloc = "hoppers." + WorldMgr.serializeLocation(loc) + ".materials";
if (mats == null) {
data.set(cloc, null);
saveData();
return;
}
List<String> allowed = new ArrayList<String>();
for (Material mat : mats) {
allowed.add(mat.name());
}
data.set(cloc, allowed);
saveData();
}
}

36
src/cx/sfy/LagAssist/ExactTPS.java

@ -0,0 +1,36 @@
package cx.sfy.LagAssist;
public class ExactTPS implements Runnable {
public static int TICK_COUNT = 0;
public static long[] TICKS = new long[600];
public static long LAST_TICK = 0L;
public static double getTPS() {
return getTPS(100);
}
public static double getTPS(int ticks) {
if (TICK_COUNT - 1 < ticks) {
return 20.0D;
}
int target = (TICK_COUNT - 1 - ticks) % TICKS.length;
long elapsed = System.currentTimeMillis() - TICKS[target];
return ticks / (elapsed / 1000.0D);
}
public static long getElapsed(int tickID) {
if (TICK_COUNT - tickID >= TICKS.length) {
}
long time = TICKS[(tickID % TICKS.length)];
return System.currentTimeMillis() - time;
}
@Override
public void run() {
TICKS[(TICK_COUNT % TICKS.length)] = System.currentTimeMillis();
TICK_COUNT += 1;
}
}

148
src/cx/sfy/LagAssist/Main.java

@ -0,0 +1,148 @@
package cx.sfy.LagAssist;
import java.io.File;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
import org.bukkit.plugin.java.JavaPlugin;
import cx.sfy.LagAssist.api.APIManager;
import cx.sfy.LagAssist.chunks.ChkAnalyse;
import cx.sfy.LagAssist.chunks.ChkLimiter;
import cx.sfy.LagAssist.chunks.DynViewer;
import cx.sfy.LagAssist.client.ClientMain;
import cx.sfy.LagAssist.cmd.CommandListener;
import cx.sfy.LagAssist.cmd.CommandTabListener;
import cx.sfy.LagAssist.cmd.StatsAnalyse;
import cx.sfy.LagAssist.economy.EconomyManager;
import cx.sfy.LagAssist.gui.DataGUI;
import cx.sfy.LagAssist.hoppers.HopperManager;
import cx.sfy.LagAssist.logpurger.PurgerMain;
import cx.sfy.LagAssist.metrics.MetricsManager;
import cx.sfy.LagAssist.microfeatures.MicroManager;
import cx.sfy.LagAssist.mobs.SmartMob;
import cx.sfy.LagAssist.mobs.SpawnerMgr;
import cx.sfy.LagAssist.packets.PacketInjector;
import cx.sfy.LagAssist.packets.PacketMain;
import cx.sfy.LagAssist.packets.Reflection;
import cx.sfy.LagAssist.safety.SafetyManager;
import cx.sfy.LagAssist.stacker.StackManager;
import cx.sfy.LagAssist.updater.SmartUpdater;
import cx.sfy.LagAssist.utils.Others;
import cx.sfy.LagAssist.utils.VersionMgr;
import cx.sfy.LagAssist.utils.WorldMgr;
public class Main extends JavaPlugin implements Listener {
public static String USER = "%%__USER__%%";
public static final String PREFIX = "§c§lLag§f§lAssist §e» §f";
public static JavaPlugin p;
public static boolean paper = false;
// Debug mode means people will get verbose info.
public static int debug = 0;
private static File file;
public static FileConfiguration config = new YamlConfiguration();
@Override
public void onEnable() {
p = this;
file = new File(getDataFolder(), "server.yml");
config = Others.getConfig(file, 29);
paper = VersionMgr.isPaper();
// Start Smart updater to check for updates.
SmartUpdater.Enabler();
Bukkit.getLogger().info(Main.PREFIX + "Enabling Systems:");
EnableClasses(false);
getServer().getPluginManager().registerEvents(this, this);
getCommand("lagassist").setExecutor(new CommandListener());
getCommand("lagassist").setTabCompleter(new CommandTabListener());
}
private static void EnableClasses(boolean reload) {
EconomyManager.Enabler(reload);
SafetyManager.Enabler(reload);
Reflection.Enabler();
Data.Enabler();
SmartMob.Enabler(reload);
MicroManager.Enabler(reload);
HopperManager.Enabler(reload);
StackManager.Enabler(reload);
Redstone.Enabler(reload);
Physics.Enabler(reload);
Monitor.Enabler(reload);
MonTools.Enabler(reload);
WorldMgr.Enabler();
ChkAnalyse.Enabler();
ChkLimiter.Enabler(reload);
StatsAnalyse.Enabler(reload);
PurgerMain.Enabler();
SpawnerMgr.Enabler(reload);
DynViewer.Enabler(reload);
ClientMain.Enabler();
DataGUI.Enabler(reload);
MetricsManager.Enabler(reload);
PacketMain.Enabler(reload);
// API ICON
APIManager.Enabler(reload);
}
public static void ReloadPlugin(CommandSender s) {
config = Others.getConfig(file, 29);
Bukkit.getLogger().info(Main.PREFIX + "Reloading Systems:");
EnableClasses(true);
s.sendMessage(Main.PREFIX + "Reloaded the config successfully.");
}
@Override
public void onDisable() {
if (PacketMain.isPacketEnabled()) {
PacketInjector.Disabler();
}
StackManager.Disabler();
}
public static void sendDebug(String msg, int mindebug) {
if (mindebug > debug) {
return;
}
for (Player p : Bukkit.getOnlinePlayers()) {
if (!p.hasPermission("lagassist.debug")) {
continue;
}
p.sendMessage(msg + "(MINDEBUG: " + mindebug + ")");
}
if (debug == 2) {
try {
throw new Exception(msg);
} catch (Exception e) {
e.printStackTrace();
}
return;
}
}
}

222
src/cx/sfy/LagAssist/MonTools.java

@ -0,0 +1,222 @@
package cx.sfy.LagAssist;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.World;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerItemHeldEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.map.MapView;
import cx.sfy.LagAssist.maps.TpsRender;
import cx.sfy.LagAssist.minebench.SpecsGetter;
import cx.sfy.LagAssist.packets.Reflection;
import cx.sfy.LagAssist.utils.VersionMgr;
public class MonTools implements Listener {
public static ItemStack mapitem = VersionMgr.getMap();
public static ItemMeta mapitemmeta = mapitem.getItemMeta();
public static List<UUID> actionmon = new ArrayList<UUID>();
public static List<UUID> mapusers = new ArrayList<UUID>();
private static DecimalFormat format = new DecimalFormat("#0.00");
private static String stbmsg = Main.config.getString("stats-bar.message");
private static int stbinterv = Main.config.getInt("stats-bar.tps-interval");
private static int stbshowdl = Main.config.getInt("stats-bar.show-delay");
public static void Enabler(boolean reload) {
if (!reload) {
Main.p.getServer().getPluginManager().registerEvents(new MonTools(), Main.p);
}
Bukkit.getLogger().info(" §e[§a✔§e] §fMapVisualizer.");
mapitemmeta.setDisplayName("§c§lLag§f§lAssist §e§lMonitor");
mapitem.setItemMeta(mapitemmeta);
int mapid = VersionMgr.getMapId(mapitem);
MapView view = Reflection.getMapView(mapid);
if (view != null) {
view.getRenderers().clear();
view.addRenderer(new TpsRender());
}
StatsBar();
}
public static void StatsBar() {
Bukkit.getScheduler().runTaskTimer(Main.p, () -> {
if (actionmon.size() == 0) {
return;
}
boolean found = false;
for (int i = 0; i<actionmon.size();i++) {
if (Bukkit.getPlayer(actionmon.get(i)) != null) {
found = true;
break;
}
}
if (!found) {
return;
}
double tpsraw = (ExactTPS.getTPS(10) > 20) ? 20 : ExactTPS.getTPS(stbinterv);
String chunks = String.valueOf(getChunkCount());
String ents = String.valueOf(getEntCount());
Bukkit.getScheduler().runTaskAsynchronously(Main.p, () -> {
if (actionmon.isEmpty()) {
return;
}
String tps;
if (tpsraw > 18) {
tps = "§a" + format.format(tpsraw);
} else if (tpsraw > 15) {
tps = "§e" + format.format(tpsraw);
} else {
tps = "§c" + format.format(tpsraw);
}
String s = ChatColor.translateAlternateColorCodes('&',
stbmsg.replaceAll("\\{TPS\\}", tps)
.replaceAll("\\{MEM\\}", format.format(SpecsGetter.FreeRam() / 1024))
.replaceAll("\\{CHKS\\}", chunks)
.replaceAll("\\{ENT\\}", ents));
for (UUID u : actionmon) {
Player p = Bukkit.getPlayer(u);
if (p == null) {
continue;
}
Reflection.sendAction(p, s);
}
});
}, stbshowdl, stbshowdl);
}
public static int getEntCount() {
int lng = 0;
for (World w : Bukkit.getWorlds()) {
lng += w.getEntities().size();
}
return lng;
}
public static int getChunkCount() {
int lng = 0;
for (World w : Bukkit.getWorlds()) {
lng += w.getLoadedChunks().length;
}
return lng;
}
@EventHandler
public void onSlotChange(PlayerItemHeldEvent e) {
Player p = e.getPlayer();
ItemStack old = p.getInventory().getItem(e.getPreviousSlot());
ItemStack nw = p.getInventory().getItem(e.getNewSlot());
if (runNew(nw, p)) {
return;
}
runOld(old, p);
}
// @EventHandler(priority = EventPriority.LOWEST)
// public void onMapLoad(MapInitializeEvent e) {
// Main.p.getLogger().warning("0");
// MapView view = e.getMap();
//
// if (Reflection.getMapId(e.get) != Data.getMapId()) {
// return;
// }
//
// Main.p.getLogger().warning("1");
//
// view.addRenderer(new TpsRender());
// }
public static void giveMap(Player p) {
PlayerInventory inv = p.getInventory();
int slot = inv.getHeldItemSlot();
inv.setItem(slot, MonTools.mapitem);
UUID UUID = p.getUniqueId();
if (!mapusers.contains(UUID)) {
mapusers.add(UUID);
}
}
private static void runOld(ItemStack old, Player p) {
if (old == null) {
return;
}
if (!old.hasItemMeta()) {
return;
}
ItemMeta ometa = old.getItemMeta();
if (!ometa.hasDisplayName()) {
return;
}
if (ometa.getDisplayName() != mapitemmeta.getDisplayName()) {